Merge pull request #20680 from cpuguy83/close_plugin_req_body_on_error
Close resp body on plugin call error Upstream-commit: a13945dd169b8ec83a3f17103a47ce124c024c03 Component: engine
This commit is contained in:
@@ -124,6 +124,7 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool)
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
resp.Body.Close()
|
||||
if err != nil {
|
||||
return nil, &statusError{resp.StatusCode, serviceMethod, err.Error()}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user