Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1813 from mitar/patch-1
Browse files Browse the repository at this point in the history
Make sure response is fully consumed
  • Loading branch information
svanharmelen authored Oct 4, 2023
2 parents 9085e18 + c92eb1b commit 285184d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gitlab.go
Original file line number Diff line number Diff line change
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 285184d

Please sign in to comment.