Update common/common.cpp
Co-authored-by: Xuan Son Nguyen <thichthat@gmail.com>
This commit is contained in:
parent
951084cb9f
commit
3a957ec149
1 changed files with 1 additions and 3 deletions
|
@ -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_HEADERFUNCTION, static_cast<CURLOPT_HEADERFUNCTION_PTR>(header_callback));
|
||||||
curl_easy_setopt(curl.get(), CURLOPT_HEADERDATA, &headers);
|
curl_easy_setopt(curl.get(), CURLOPT_HEADERDATA, &headers);
|
||||||
|
|
||||||
int head_request_attempts = 3;
|
int remaining_request_attempts = CURL_MAX_RETRY;
|
||||||
int remaining_request_attempts = 3;
|
|
||||||
int retry_delay = 2;
|
|
||||||
while (remaining_request_attempts > 0){
|
while (remaining_request_attempts > 0){
|
||||||
CURLcode res = curl_easy_perform(curl.get());
|
CURLcode res = curl_easy_perform(curl.get());
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue