summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/client.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/client.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/client.go b/vendor/gopkg.in/olivere/elastic.v5/client.go
index 2e190a579..b5f5c75ad 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.70"
+ Version = "5.0.74"
// 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.
@@ -1301,17 +1301,10 @@ func (c *Client) PerformRequestWithOptions(ctx context.Context, opt PerformReque
// Get response
res, err := c.c.Do((*http.Request)(req).WithContext(ctx))
- if err == context.Canceled || err == context.DeadlineExceeded {
+ if IsContextErr(err) {
// 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 || ue.Temporary() {
- // Proceed, but don't mark the node as dead
- return nil, err
- }
- }
if err != nil {
n++
wait, ok, rerr := retrier.Retry(ctx, n, (*http.Request)(req), res, err)