automatically retry GET requests when http2 connection lost

This commit is contained in:
David Eads 2024-08-27 16:32:32 -04:00
parent e9c9a27c97
commit 332a094e23

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