diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-09-21 23:11:17 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-09-21 23:11:17 +0300 |
commit | b551e8bcc63900eee1052499b00e9eb2fce71d77 (patch) | |
tree | 93f3267801efaf50771951be1ee4d556ed24f7b1 | |
parent | 33e153398fc9fb027146ae7a7d9887ffc6d9348d (diff) |
Fix error on timeoutv0.3.2
-rw-r--r-- | client.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -41,6 +41,12 @@ func (cl *client) requestReader(method, path string, query url.Values, body io.R } resp, err := cl.httpClient.Do(req) if err != nil { + err, ok := err.(*url.Error) + if ok { + if err.Timeout() { + return nil, nil + } + } return nil, err } if resp.StatusCode != http.StatusOK { |