Skip to content

Commit

Permalink
Make sure response is fully consumed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Oct 4, 2023
1 parent 8cb9c32 commit c92eb1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gitlab.go
Expand Up @@ -813,6 +813,7 @@ func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*Response, error
return c.Do(req, v)
}
defer resp.Body.Close()
defer io.Copy(io.Discard, resp.Body)

// If not yet configured, try to configure the rate limiter
// using the response headers we just received. Fail silently
Expand Down

0 comments on commit c92eb1b

Please sign in to comment.