bug fix: close http response body no longer in use

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6c49576a860433d89b3c2d651bdca386353128cc
Component: engine
This commit is contained in:
Zhang Wei
2015-05-29 12:03:40 +08:00
parent fd72895a8e
commit 731e6df224
+1
View File
@@ -68,6 +68,7 @@ func (c *Client) callWithRetry(serviceMethod string, args interface{}, ret inter
continue
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
remoteErr, err := ioutil.ReadAll(resp.Body)
if err != nil {