summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-18 03:41:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-18 03:41:44 +0300
commitde583a6d0d2a1e2e101d9e10916e72edb23d21b8 (patch)
tree6d08e8ed5465e5c60d9313b4fd78c2a44519f371 /src
parent37d798e82c029b4cbd2c773266b851b2bf78e920 (diff)
downloadmv-de583a6d0d2a1e2e101d9e10916e72edb23d21b8.tar.gz
mv-de583a6d0d2a1e2e101d9e10916e72edb23d21b8.tar.bz2
mv-de583a6d0d2a1e2e101d9e10916e72edb23d21b8.tar.xz
mv-de583a6d0d2a1e2e101d9e10916e72edb23d21b8.zip
Set minimal allowed speed in curl is 1 bytes per minute.
If speed slower, will be disconnect. Probably it will fix issue with routing or mtu stuck connections.
Diffstat (limited to 'src')
-rw-r--r--src/net/download.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 45f2989c0..d36c59032 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -583,6 +583,9 @@ void Download::secureCurl(CURL *const curl A_UNUSED)
#if LIBCURL_VERSION_NUM >= 0x070a08
curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 536870912);
#endif // LIBCURL_VERSION_NUM >= 0x070a08
+
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1L);
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
}
#if LIBCURL_VERSION_NUM >= 0x071507