|
@@ -145,6 +145,7 @@ func (p *PastureClient) doRequest(req *http.Request) ([]byte, error) {
|
|
|
zaplog.Error("PastureClient", zap.Any("authClient.Do", err))
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
+ defer resp.Body.Close()
|
|
|
b, err := ioutil.ReadAll(resp.Body)
|
|
|
if err != nil {
|
|
|
zaplog.Error("PastureClient", zap.Any("ioutil.ReadAll", err))
|