From d69e298e048ecd0b2b968cb4f736c587274ebb14 Mon Sep 17 00:00:00 2001 From: David Eads Date: Tue, 27 Aug 2024 16:32:32 -0400 Subject: [PATCH] automatically retry GET requests when http2 connection lost Kubernetes-commit: 332a094e231942b8b6c2052d078241ddc698fe74 --- rest/request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/request.go b/rest/request.go index f5a9f68c..25f3a059 100644 --- a/rest/request.go +++ b/rest/request.go @@ -1143,7 +1143,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp return false } // For connection errors and apiserver shutdown errors retry. - if net.IsConnectionReset(err) || net.IsProbableEOF(err) { + if net.IsConnectionReset(err) || net.IsProbableEOF(err) || net.IsHTTP2ConnectionLost(err) { return true } return false