mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
remove unnecessary buffer while discarding stream (#7214)
This commit is contained in:
parent
18c4ecbbef
commit
c1b3f1994b
@ -44,9 +44,7 @@ func DrainBody(respBody io.ReadCloser) {
|
||||
// Without this closing connection would disallow re-using
|
||||
// the same connection for future uses.
|
||||
// - http://stackoverflow.com/a/17961593/4465767
|
||||
bufp := b512pool.Get().(*[]byte)
|
||||
defer b512pool.Put(bufp)
|
||||
io.CopyBuffer(ioutil.Discard, respBody, *bufp)
|
||||
respBody.Close()
|
||||
defer respBody.Close()
|
||||
io.Copy(ioutil.Discard, respBody)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user