mirror of https://github.com/k3s-io/k3s
Check nil error in IsProbableEOF()
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