diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-08-08 22:06:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 22:06:26 +0200 |
commit | 35ebae198f5af5b5283bfb36ef6e85a29006e4c9 (patch) | |
tree | c81446312467afc71afbfcda29abd4e1ecfb89b9 /src/libstore/download.cc | |
parent | 05a10dd835923092b54fcad2276d54bf164c1b7f (diff) | |
parent | a02457db715a80de7630d823fd8d7230a4bd451f (diff) |
Merge pull request #3031 from grahamc/low-speed-limit
conf: stalled-download-timeout: make tunable
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 91087eebc..c322d267d 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -236,8 +236,6 @@ struct CurlDownloader : public Downloader return ((DownloadItem *) userp)->readCallback(buffer, size, nitems); } - long lowSpeedTimeout = 300; - void init() { if (!req) req = curl_easy_init(); @@ -297,7 +295,7 @@ struct CurlDownloader : public Downloader curl_easy_setopt(req, CURLOPT_CONNECTTIMEOUT, downloadSettings.connectTimeout.get()); curl_easy_setopt(req, CURLOPT_LOW_SPEED_LIMIT, 1L); - curl_easy_setopt(req, CURLOPT_LOW_SPEED_TIME, lowSpeedTimeout); + curl_easy_setopt(req, CURLOPT_LOW_SPEED_TIME, downloadSettings.stalledDownloadTimeout.get()); /* If no file exist in the specified path, curl continues to work anyway as if netrc support was disabled. */ |