reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 7d3f53477d0d9278191b7706e310c9c6a1164b0b
parent 1e102bb1f48e2982653d53a85d8b2d434b6822eb
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Tue, 26 Jan 2016 22:04:08 -0500

detect stuck downloads without enforcing a global time limit

Diffstat:
Msrc/download.cpp | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/download.cpp b/src/download.cpp @@ -97,7 +97,9 @@ DWORD WINAPI Download::Worker(void *ptr) CURL *curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, download->url().c_str()); curl_easy_setopt(curl, CURLOPT_USERAGENT, "ReaPack/1.0 (REAPER)"); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, DOWNLOAD_TIMEOUT); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, DOWNLOAD_TIMEOUT); + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, DOWNLOAD_TIMEOUT); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 1);