Skip to content

Commit

Permalink
Close http.Response.Body to avoid http connection leak. (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
code4wt authored May 21, 2021
1 parent 1e8c879 commit 22f0b09
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions output_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,6 @@ func (c *HTTPClient) Send(data []byte) ([]byte, error) {
if c.config.TrackResponses {
return httputil.DumpResponse(resp, true)
}
_ = resp.Body.Close()
return nil, nil
}

0 comments on commit 22f0b09

Please sign in to comment.