aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/client.go b/client.go
index 83551fb..14f7129 100644
--- a/client.go
+++ b/client.go
@@ -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 {