summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/client.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-08-17 17:19:06 -0700
committerGitHub <noreply@github.com>2017-08-17 17:19:06 -0700
commit96eab1202717e073782ec399a4e0820cae15b1bb (patch)
tree011012982be971c7e9ef91466f026bc0956ac9a2 /vendor/gopkg.in/olivere/elastic.v5/client.go
parent2c895ee66eed626721135acfcc48254c6e3f3b29 (diff)
downloadchat-96eab1202717e073782ec399a4e0820cae15b1bb.tar.gz
chat-96eab1202717e073782ec399a4e0820cae15b1bb.tar.bz2
chat-96eab1202717e073782ec399a4e0820cae15b1bb.zip
Updating server dependancies. (#7246)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/client.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/client.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/client.go b/vendor/gopkg.in/olivere/elastic.v5/client.go
index 13be369bd..e517a7fa8 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/client.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/client.go
@@ -26,7 +26,7 @@ import (
const (
// Version is the current version of Elastic.
- Version = "5.0.43"
+ Version = "5.0.45"
// DefaultURL is the default endpoint of Elasticsearch on the local machine.
// It is used e.g. when initializing a new Client without a specific URL.
@@ -1257,6 +1257,13 @@ func (c *Client) PerformRequest(ctx context.Context, method, path string, params
// Proceed, but don't mark the node as dead
return nil, err
}
+ if ue, ok := err.(*url.Error); ok {
+ // This happens e.g. on redirect errors, see https://golang.org/src/net/http/client_test.go#L329
+ if ue.Err == context.Canceled || ue.Err == context.DeadlineExceeded {
+ // Proceed, but don't mark the node as dead
+ return nil, err
+ }
+ }
if err != nil {
n++
wait, ok, rerr := c.retrier.Retry(ctx, n, (*http.Request)(req), res, err)