Better fix for CHOP-286 - reenabled bandwidth limits on linux now that we've fixed the freeze.

master
brad kittenbrink 2010-12-17 15:59:51 -08:00
parent 63dec2a9b9
commit f95effdacf
1 changed files with 3 additions and 7 deletions

View File

@ -427,13 +427,9 @@ void LLUpdateDownloader::Implementation::initializeCurlGet(std::string const & u
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_PROGRESSFUNCTION, &progress_callback));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_PROGRESSDATA, this));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_NOPROGRESS, false));
#if LL_WINDOWS || LL_DARWIN // temporary workaround for CHOP-286 (bandwidth limits freeze the downloader thread on linux)
if((mBandwidthLimit != 0) && !mDownloadData["required"].asBoolean()) {
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, mBandwidthLimit));
} else {
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, -1));
}
#endif // LL_WINDOWS || LL_DARWIN
// if it's a required update set the bandwidth limit to 0 (unlimited)
curl_off_t limit = mDownloadData["required"].asBoolean() ? 0 : mBandwidthLimit;
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, limit));
mDownloadPercent = 0;
}