diff --git a/client-s3.go b/client-s3.go index 37244e5a..d1243304 100644 --- a/client-s3.go +++ b/client-s3.go @@ -119,7 +119,8 @@ func newFactory() func(config *Config) (Client, *probe.Error) { // Set custom transport. api.SetCustomTransport(transport) } - + // ListObjects on a prefix with 10 million entries takes around 8 minutes. + api.SetClientTimeout(8 * time.Minute) // Store the new api object. s3Clnt.api = api diff --git a/vendor/github.com/minio/minio-go/api.go b/vendor/github.com/minio/minio-go/api.go index 2938fce2..a47cadd1 100644 --- a/vendor/github.com/minio/minio-go/api.go +++ b/vendor/github.com/minio/minio-go/api.go @@ -220,6 +220,13 @@ func (c *Client) SetCustomTransport(customHTTPTransport http.RoundTripper) { } } +// SetClientTimeout - set http client timeout. +func (c *Client) SetClientTimeout(timeout time.Duration) { + if c.httpClient != nil { + c.httpClient.Timeout = timeout + } +} + // TraceOn - enable HTTP tracing. func (c *Client) TraceOn(outputStream io.Writer) { // if outputStream is nil then default to os.Stdout. @@ -498,7 +505,6 @@ func (c Client) newRequest(method string, metadata requestMetadata) (req *http.R if method == "" { method = "POST" } - // Gather location only if bucketName is present. location := "us-east-1" // Default all other requests to "us-east-1". if metadata.bucketName != "" { diff --git a/vendor/vendor.json b/vendor/vendor.json index 7d776153..e5c83358 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,8 +39,8 @@ }, { "path": "github.com/minio/minio-go", - "revision": "5a338968f406d8351e55c0d66cc754613ab9a206", - "revisionTime": "2016-03-25T17:35:39-07:00" + "revision": "414cf5ccf29473975e6b6c544c42f26991855647", + "revisionTime": "2016-03-29T14:24:27-07:00" }, { "path": "github.com/minio/minio/pkg/atomic",