-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
The http.Do function documentation states that:
// If the returned error is nil, the Response will contain a non-nil
// Body which the user is expected to close. If the Body is not both
// read to EOF and closed, the Client's underlying RoundTripper
// (typically Transport) may not be able to re-use a persistent TCP
// connection to the server for a subsequent "keep-alive" request.
In the report method, if the response code is <300 the client doesn't read the response body causing connections to get closed by servers.
Simple fix would be to add the line:
ioutil.ReadAll(res.Body)
in the condition block.
Metadata
Metadata
Assignees
Labels
No labels