1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Abort curl transfers if they drop below 1000B/s for more than 60s.

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
This commit is contained in:
Ben Kibbey 2010-10-05 12:06:49 -07:00 committed by Brenden Matthews
parent 6119a0737e
commit 5a898d373e

View File

@ -114,6 +114,8 @@ void ccurl_fetch_data(thread_handle &handle, const ccurl_location_ptr &curloc)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) &chunk);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "conky-curl/1.0");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1000);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60);
res = curl_easy_perform(curl);
if (res == CURLE_OK && chunk.size) {