mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #73277 from smarterclayton/ignore_goaway
Add the http2 GOAWAY error to IsProbableEOF for ignoring in watch
This commit is contained in:
commit
4a44df3fef
@ -68,14 +68,17 @@ func IsProbableEOF(err error) bool {
|
|||||||
if uerr, ok := err.(*url.Error); ok {
|
if uerr, ok := err.(*url.Error); ok {
|
||||||
err = uerr.Err
|
err = uerr.Err
|
||||||
}
|
}
|
||||||
|
msg := err.Error()
|
||||||
switch {
|
switch {
|
||||||
case err == io.EOF:
|
case err == io.EOF:
|
||||||
return true
|
return true
|
||||||
case err.Error() == "http: can't write HTTP request on broken connection":
|
case msg == "http: can't write HTTP request on broken connection":
|
||||||
return true
|
return true
|
||||||
case strings.Contains(err.Error(), "connection reset by peer"):
|
case strings.Contains(msg, "http2: server sent GOAWAY and closed the connection"):
|
||||||
return true
|
return true
|
||||||
case strings.Contains(strings.ToLower(err.Error()), "use of closed network connection"):
|
case strings.Contains(msg, "connection reset by peer"):
|
||||||
|
return true
|
||||||
|
case strings.Contains(strings.ToLower(msg), "use of closed network connection"):
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user