Commit 071eb9f6 authored by Pengfei Ni's avatar Pengfei Ni

Fix panic when processing http response

parent f3b98a08
...@@ -361,7 +361,12 @@ func processHTTPRetryResponse(resp *http.Response, err error) (bool, error) { ...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment