mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Fix panic when processing http response
This commit is contained in:
parent
f3b98a08b0
commit
071eb9f6bf
@ -361,7 +361,12 @@ func processHTTPRetryResponse(resp *http.Response, err error) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if shouldRetryHTTPRequest(resp, err) {
|
if shouldRetryHTTPRequest(resp, err) {
|
||||||
glog.Errorf("processHTTPRetryResponse: backoff failure, will retry, HTTP response=%d, err=%v", resp.StatusCode, err)
|
if err != nil {
|
||||||
|
glog.Errorf("processHTTPRetryResponse: backoff failure, will retry, err=%v", err)
|
||||||
|
} else {
|
||||||
|
glog.Errorf("processHTTPRetryResponse: backoff failure, will retry, HTTP response=%d", resp.StatusCode)
|
||||||
|
}
|
||||||
|
|
||||||
// suppress the error object so that backoff process continues
|
// suppress the error object so that backoff process continues
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user