diff --git a/cmd/http/close.go b/cmd/http/close.go index 818e665ed..f8f0e10a9 100644 --- a/cmd/http/close.go +++ b/cmd/http/close.go @@ -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) } }