io.Discard is already handeld by Body.Close()
This commit is contained in:
parent
11f0c10ed2
commit
036581a6c8
@ -43,12 +43,10 @@ func (c *Client) req(method, path string, body io.Reader, intercept func(*http.R
|
|||||||
}
|
}
|
||||||
|
|
||||||
if redo, err = auth.Verify(c.c, rs, path); err != nil {
|
if redo, err = auth.Verify(c.c, rs, path); err != nil {
|
||||||
io.Copy(io.Discard, rs.Body)
|
|
||||||
rs.Body.Close()
|
rs.Body.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if redo {
|
if redo {
|
||||||
io.Copy(io.Discard, rs.Body)
|
|
||||||
rs.Body.Close()
|
rs.Body.Close()
|
||||||
if body, err = r.GetBody(); err != nil {
|
if body, err = r.GetBody(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user