Don't call usleep if it's not necessary

This commit is contained in:
Sude 2014-06-10 12:55:38 +03:00
parent f25c37074a
commit 23ded13050

View File

@ -1402,7 +1402,8 @@ std::string Downloader::getResponse(const std::string& url)
CURLcode result;
do
{
usleep(config.iWait); // Delay the request by specified time
if (config.iWait > 0)
usleep(config.iWait); // Delay the request by specified time
result = curl_easy_perform(curlhandle);
response = memory.str();
memory.str(std::string());