From 39b6560290827cc0ce2897ed549e868b6ad030d3 Mon Sep 17 00:00:00 2001 From: smilediver Date: Fri, 2 Aug 2024 21:19:00 +0300 Subject: [PATCH] Fix Curl downloader not observing set task limits (#2067) * Delete unused variable * Remove invalid comment * Fix Curl downloader not observing set task limits --- core/network/Downloader-curl.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/network/Downloader-curl.cpp b/core/network/Downloader-curl.cpp index 5fa8416d1996..514c31d949f0 100644 --- a/core/network/Downloader-curl.cpp +++ b/core/network/Downloader-curl.cpp @@ -52,7 +52,7 @@ // https://curl.se/libcurl/c/curl_easy_getinfo.html // https://curl.se/libcurl/c/curl_easy_setopt.html -# define AX_CURL_POLL_TIMEOUT_MS 1000 // wait until DNS query done +# define AX_CURL_POLL_TIMEOUT_MS 1000 enum { @@ -611,7 +611,6 @@ class DownloaderCURL::Impl : public std::enable_shared_from_this(task->_coTask.get()); @@ -623,7 +622,7 @@ class DownloaderCURL::Impl : public std::enable_shared_from_thissetErrorDesc(DownloadTask::ERROR_IMPL_INTERNAL, errCode, std::move(errorMsg)); break; } @@ -669,9 +668,12 @@ class DownloaderCURL::Impl : public std::enable_shared_from_this= countOfMaxProcessingTasks) + break; + // get task wrapper from request queue std::shared_ptr task; {