Skip to content

Commit

Permalink
Check if retry error is a Timeout
Browse files Browse the repository at this point in the history
[NO NEW TESTS NEEDED] No idea how to cause this situation.

Fixes: containers/podman#14359

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed May 26, 2022
1 parent c26b04e commit c521bc6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,11 @@ func isErrnoRetryable(e error) bool {
case syscall.ECONNREFUSED, syscall.EINTR, syscall.EAGAIN, syscall.EBUSY, syscall.ENETDOWN, syscall.ENETUNREACH, syscall.ENETRESET, syscall.ECONNABORTED, syscall.ECONNRESET, syscall.ETIMEDOUT, syscall.EHOSTDOWN, syscall.EHOSTUNREACH:
return true
}
switch err := e.(type) { //nolint:singleCaseSwitch
case net.Error:
if err.Timeout() {
return true
}
}
return isErrnoERESTART(e)
}

0 comments on commit c521bc6

Please sign in to comment.