From 2ea16262e02ff9a6264624fb7e1c21c59676a2f1 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Fri, 13 Nov 2015 19:55:26 -0800 Subject: [PATCH] Fix to use single connection to the server --- vendor/github.com/minio/minio-go/s3-api.go | 8 ++++++++ vendor/vendor.json | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vendor/github.com/minio/minio-go/s3-api.go b/vendor/github.com/minio/minio-go/s3-api.go index 100c8950..3dd05eb6 100644 --- a/vendor/github.com/minio/minio-go/s3-api.go +++ b/vendor/github.com/minio/minio-go/s3-api.go @@ -41,7 +41,15 @@ type s3API struct { // closeResp close non nil response with any response Body. func closeResp(resp *http.Response) { + // Callers should close resp.Body when done reading from it. + // If resp.Body is not closed, the Client's underlying RoundTripper + // (typically Transport) may not be able to re-use a persistent TCP + // connection to the server for a subsequent "keep-alive" request. if resp != nil && resp.Body != nil { + // Drain any remaining Body and then close the connection. + // Without this closing connection would disallow re-using + // the same connection for future uses. + // - http://stackoverflow.com/a/17961593/4465767 io.Copy(ioutil.Discard, resp.Body) resp.Body.Close() } diff --git a/vendor/vendor.json b/vendor/vendor.json index f6f12077..8801b0d0 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -29,8 +29,8 @@ }, { "path": "github.com/minio/minio-go", - "revision": "8d76e3db295dbc5e46697f75907c8eedfa50cce3", - "revisionTime": "2015-11-13T19:31:33-08:00" + "revision": "5eb302c71339c00f6a895f2dca133395227c0fae", + "revisionTime": "2015-11-13T19:53:11-08:00" }, { "path": "github.com/minio/minio-xl/pkg/probe",