Skip to content

Commit

Permalink
Merge pull request #393 from ii2day/main
Browse files Browse the repository at this point in the history
fix not read response body can't reuse connect
  • Loading branch information
weizhoublue authored Dec 5, 2023
2 parents 120f094 + c7784a7 commit b08dc76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/loadRequest/loadHttp/http_requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func (b *Work) makeRequest(c *http.Client, wg *sync.WaitGroup) {
var statusCode int
if err == nil {
size = resp.ContentLength
_, _ = io.Copy(io.Discard, resp.Body)
resp.Body.Close()
statusCode = resp.StatusCode
} else {
Expand Down

0 comments on commit b08dc76

Please sign in to comment.