diff --git a/client.go b/client.go index 9e86b97..3c78a23 100644 --- a/client.go +++ b/client.go @@ -564,8 +564,7 @@ func (c *Client) Do(req *Request) (*http.Response, error) { if req.body != nil { body, err := req.body() if err != nil { - c.HTTPClient.CloseIdleConnections() - return resp, err + return nil, err } if c, ok := body.(io.ReadCloser); ok { req.Body = c