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 8acc3a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func isRetryable(err error) bool {
case unwrapper: // Test this last, because various error types might implement .Unwrap()
err = e.Unwrap()
return isRetryable(err)
case net.Error:
if e.Timeout() {
return true
}
}

return false
Expand Down

0 comments on commit 8acc3a3

Please sign in to comment.