Use cached result if there is a network error
This commit is contained in:
parent
1fc905ad4c
commit
4ed2187377
3 changed files with 15 additions and 8 deletions
|
|
@ -100,7 +100,7 @@ struct Curl
|
|||
CURLcode res = curl_easy_perform(curl);
|
||||
if (res == CURLE_WRITE_ERROR && etag == expectedETag) return false;
|
||||
if (res != CURLE_OK)
|
||||
throw Error(format("unable to download ‘%1%’: %2% (%3%)")
|
||||
throw DownloadError(format("unable to download ‘%1%’: %2% (%3%)")
|
||||
% url % curl_easy_strerror(res) % res);
|
||||
|
||||
long httpStatus = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue