Merge pull request #126954 from deads2k/retry-http2

automatically retry GET requests when http2 connection lost
This commit is contained in:
Kubernetes Prow Robot 2024-08-28 21:58:10 +01:00 committed by GitHub
commit aa45153447
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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