Просмотр исходного кода

Merge pull request #13577 from WeiZhang555/httpClose

bug fix: close http response body no longer in use
Phil Estes 10 лет назад
Родитель
Сommit
1680c78e63
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 {