mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-29 12:23:17 -04:00
There was already a timeout set using `CURLOPT_CONNECTTIMEOUT`, but that only affects the initial connection. Once a HTTP connection is established, the timeout is ineffective. That means that once a HTTP connection is established, there is no bound on the length of time a download can take. Sometimes, downloads drop to very low speeds (for Networking Reasons) and we need a way to give up on a download if that happens. So, set a low speed limit of 10KB/s for 60s. If a curl download goes more slowly than this, it will be considered timed out, and the `CURLE_OPERATION_TIMEDOUT` code path will be taken. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: https://github.com/flatpak/flatpak/issues/5519
47 KiB
47 KiB