diff options
Diffstat (limited to 'primedev/mods')
-rw-r--r-- | primedev/mods/autodownload/moddownloader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/primedev/mods/autodownload/moddownloader.cpp b/primedev/mods/autodownload/moddownloader.cpp index 80be8d19..1e3c6af6 100644 --- a/primedev/mods/autodownload/moddownloader.cpp +++ b/primedev/mods/autodownload/moddownloader.cpp @@ -163,6 +163,11 @@ std::optional<fs::path> ModDownloader::FetchModFromDistantStore(std::string_view curl_easy_setopt(easyhandle, CURLOPT_URL, url.data()); curl_easy_setopt(easyhandle, CURLOPT_FAILONERROR, 1L); + + // abort if slower than 30 bytes/sec during 10 seconds + curl_easy_setopt(easyhandle, CURLOPT_LOW_SPEED_TIME, 10L); + curl_easy_setopt(easyhandle, CURLOPT_LOW_SPEED_LIMIT, 30L); + curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, fp); curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, WriteData); curl_easy_setopt(easyhandle, CURLOPT_NOPROGRESS, 0L); |