Http: fixed no_retry handling

This commit is contained in:
Jan Bartipan 2024-09-10 15:00:41 +02:00 committed by Lukas Matena
parent 7b2ee2ae0c
commit 5b79c8b50a

View File

@ -398,8 +398,8 @@ void Http::priv::http_perform(const HttpRetryOpt& retry_opts)
if (res == CURLE_OK) if (res == CURLE_OK)
::curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status); ::curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status);
retry = delay >= 0ms && is_transient_error(res, http_status); retry = is_transient_error(res, http_status);
if (retry && retry_opts.max_retries > 0 && num_retries >= retry_opts.max_retries) if (retry && num_retries >= retry_opts.max_retries)
retry = false; retry = false;
if (retry) { if (retry) {
num_retries++; num_retries++;