mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Check nil error in IsProbableEOF()
This commit is contained in:
parent
07240b7166
commit
59b878f3e0
@ -61,6 +61,9 @@ func JoinPreservingTrailingSlash(elem ...string) string {
|
||||
// differentiate probable errors in connection behavior between normal "this is
|
||||
// disconnected" should use the method.
|
||||
func IsProbableEOF(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
if uerr, ok := err.(*url.Error); ok {
|
||||
err = uerr.Err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user