From 116f9d88f2fbc6ea70b789d086791ec10dc4cae1 Mon Sep 17 00:00:00 2001 From: Sude Date: Mon, 4 Jul 2016 12:51:01 +0300 Subject: [PATCH] Fix error in ca436a9927d673183cae7d227c90d53ca29b1ba6 This caused average download rate to be always 0 because it was never set --- src/downloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index 4696a23..052d6fd 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -3183,8 +3183,8 @@ int Downloader::progressCallbackForThread(void *clientp, curl_off_t dltotal, cur info.dltotal = dltotal; // trying to get rate and setting to NaN if it fails - if (CURLE_OK != curl_easy_getinfo(xferinfo->curlhandle, CURLINFO_SPEED_DOWNLOAD, &info.rate)) - info.rate_avg = std::numeric_limits::quiet_NaN(); + if (CURLE_OK != curl_easy_getinfo(xferinfo->curlhandle, CURLINFO_SPEED_DOWNLOAD, &info.rate_avg)) + info.rate_avg = std::numeric_limits::quiet_NaN(); // setting full dlwnow and dltotal if (xferinfo->offset > 0)