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 31, 2022
1 parent 6d22aa8 commit 956461a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ func isRetryable(err error) bool {
}
}
return true
case net.Error:
if e.Timeout() {
return true
}
if unwrappable, ok := e.(unwrapper); ok {
err = unwrappable.Unwrap()
return isRetryable(err)
}
case unwrapper: // Test this last, because various error types might implement .Unwrap()
err = e.Unwrap()
return isRetryable(err)
Expand Down

0 comments on commit 956461a

Please sign in to comment.