Update common/common.cpp

Co-authored-by: Xuan Son Nguyen <thichthat@gmail.com>
This commit is contained in:
Farbod Bijary 2024-08-31 17:09:20 +03:30 committed by GitHub
parent 951084cb9f
commit 3a957ec149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2361,9 +2361,7 @@ static bool llama_download_file(const std::string & url, const std::string & pat
curl_easy_setopt(curl.get(), CURLOPT_HEADERFUNCTION, static_cast<CURLOPT_HEADERFUNCTION_PTR>(header_callback));
curl_easy_setopt(curl.get(), CURLOPT_HEADERDATA, &headers);
int head_request_attempts = 3;
int remaining_request_attempts = 3;
int retry_delay = 2;
int remaining_request_attempts = CURL_MAX_RETRY;
while (remaining_request_attempts > 0){
CURLcode res = curl_easy_perform(curl.get());
if (res != CURLE_OK) {