mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +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
|
// differentiate probable errors in connection behavior between normal "this is
|
||||||
// disconnected" should use the method.
|
// disconnected" should use the method.
|
||||||
func IsProbableEOF(err error) bool {
|
func IsProbableEOF(err error) bool {
|
||||||
|
if err == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if uerr, ok := err.(*url.Error); ok {
|
if uerr, ok := err.(*url.Error); ok {
|
||||||
err = uerr.Err
|
err = uerr.Err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user