This caused average download rate to be always 0 because it was never set
This commit is contained in:
Sude 2016-07-04 12:51:01 +03:00
parent ca436a9927
commit 116f9d88f2

View File

@ -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<double>::quiet_NaN();
if (CURLE_OK != curl_easy_getinfo(xferinfo->curlhandle, CURLINFO_SPEED_DOWNLOAD, &info.rate_avg))
info.rate_avg = std::numeric_limits<double>::quiet_NaN();
// setting full dlwnow and dltotal
if (xferinfo->offset > 0)