This commit is contained in:
Vladislav Yarmak
2021-03-25 20:45:48 +02:00
parent fa5f109285
commit 3f986a0e50
2 changed files with 30 additions and 2 deletions
+2 -2
View File
@@ -168,8 +168,8 @@ func (c *SEClient) populateRequest(req *http.Request) {
// Does cleanup of HTTP response in order to make it reusable by keep-alive
// logic of HTTP client
func cleanupBody(body io.ReadCloser) {
io.Copy(io.Discard, io.LimitedReader{
R: resp.Body,
io.Copy(ioutil.Discard, &io.LimitedReader{
R: body,
N: READ_LIMIT,
})
body.Close()