Skip to content

Commit

Permalink
Properly return the error when client.Do() times out
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyist committed Feb 2, 2016
1 parent cde416b commit 4e614d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -94,7 +94,7 @@ func (c *HTTPClient) Do(req *http.Request) (*http.Response, error) {
var resp *http.Response
var err error
breaker := c.breakerLookup(req.URL.String())
breaker.Call(func() error {
err = breaker.Call(func() error {
resp, err = c.Client.Do(req)
return err
}, c.timeout)
Expand Down

0 comments on commit 4e614d8

Please sign in to comment.