소스 검색

bug fix: close http response body no longer in use

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Zhang Wei 10 년 전
부모
커밋
6c49576a86
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      pkg/plugins/client.go

+ 1 - 0
pkg/plugins/client.go

@@ -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 {