Skip to content

Commit

Permalink
Retry "Connection reset by peer"
Browse files Browse the repository at this point in the history
Building the GDAL image can fail with:

Downloading https://cdn.proj.org/fr_ign_RAF18b.tif... (132 / 423)
Downloading https://cdn.proj.org/fr_ign_RAF20.tif... (133 / 423)
Downloading https://cdn.proj.org/fr_ign_RAGTBT2016.tif... (134 / 423)
Cannot open https://cdn.proj.org/fr_ign_RAGTBT2016.tif: OpenSSL SSL_read: Connection reset by peer, errno 104

so add the connection reset by peer
to the list of things that get a retry
time.
  • Loading branch information
pjonsson authored and github-actions[bot] committed Mar 27, 2024
1 parent f9a967c commit 65fd97d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/networkfilemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,7 @@ static double GetNewRetryDelay(int response_code, double dfOldDelay,
// S3 sends some client timeout errors as 400 Client Error
(response_code == 400 && pszErrBuf &&
strstr(pszErrBuf, "RequestTimeout")) ||
(pszCurlError && strstr(pszCurlError, "Connection reset by peer")) ||
(pszCurlError && strstr(pszCurlError, "Connection timed out"))) {
// Use an exponential backoff factor of 2 plus some random jitter
// We don't care about cryptographic quality randomness, hence:
Expand Down

0 comments on commit 65fd97d

Please sign in to comment.