mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
bug fix: close http response body no longer in use
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
7f6a7973cd
commit
6c49576a86
1 changed files with 1 additions and 0 deletions
|
@ -68,6 +68,7 @@ func (c *Client) callWithRetry(serviceMethod string, args interface{}, ret inter
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
remoteErr, err := ioutil.ReadAll(resp.Body)
|
remoteErr, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue