mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #60591 from MrHohn/fix-probableEOF-panic
Automatic merge from submit-queue (batch tested with PRs 52077, 60456, 60591). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. [e2e] Fix panicing ingress jobs **What this PR does / why we need it**: When a nil error is passed into IsProbableEOF(), test will panic. Ref https://github.com/kubernetes/kubernetes/issues/60381#issuecomment-369353511. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #60381 **Special notes for your reviewer**: /assign @shyamjvs cc @krzyzacy **Release note**: ```release-note NONE ```
This commit is contained in:
commit
060a66ae20
@ -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