mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Close the response body (#1036)
This commit is contained in:
parent
c41411b97e
commit
9ba22f656b
@ -60,6 +60,7 @@ func (client *Client) circleRequest(path string) (*http.Response, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer func() { _ = resp.Body.Close() }()
|
||||||
|
|
||||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||||
return nil, fmt.Errorf(resp.Status)
|
return nil, fmt.Errorf(resp.Status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user