From 956461a0925b4e689d18b45928a04061224b1bd8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 26 May 2022 06:24:24 -0400 Subject: [PATCH] Check if retry error is a Timeout [NO NEW TESTS NEEDED] No idea how to cause this situation. Fixes: https://github.com/containers/podman/issues/14359 Signed-off-by: Daniel J Walsh --- pkg/retry/retry.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/retry/retry.go b/pkg/retry/retry.go index 234fd3448..c7a96c1cf 100644 --- a/pkg/retry/retry.go +++ b/pkg/retry/retry.go @@ -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)