Skip to content

Commit

Permalink
Removed http.Client timeout to avoid premature disconnection while st…
Browse files Browse the repository at this point in the history
…reaming large objects (#403)
  • Loading branch information
krisis authored and harshavardhana committed May 20, 2016
1 parent 2c8f80b commit d013d3d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ func privateNew(endpoint, accessKeyID, secretAccessKey string, secure bool) (*Cl

// Instantiate http client and bucket location cache.
clnt.httpClient = &http.Client{
// Setting a sensible time out of 2minutes to wait for response
// headers. Request is pro-actively cancelled after 2minutes
// if no response was received from server.
Timeout: 2 * time.Minute,
Transport: http.DefaultTransport,
}

Expand Down Expand Up @@ -220,13 +216,6 @@ 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.
Expand Down

0 comments on commit d013d3d

Please sign in to comment.