Skip to content

Commit 494bb52

Browse files
committed
Implement ShouldRetry() explicitly rather than indirectly
Signed-off-by: Bryan Boreham <[email protected]>
1 parent 67ba11a commit 494bb52

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/chunk/aws/retryer.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"time"
66

7-
"github.com/aws/aws-sdk-go/aws/client"
87
"github.com/aws/aws-sdk-go/aws/request"
98
ot "github.com/opentracing/opentracing-go"
109
otlog "github.com/opentracing/opentracing-go/log"
@@ -42,8 +41,7 @@ func (r *retryer) RetryRules(req *request.Request) time.Duration {
4241

4342
// ShouldRetry returns if the failed request is retryable.
4443
func (r *retryer) ShouldRetry(req *request.Request) bool {
45-
var d client.DefaultRetryer
46-
return d.ShouldRetry(req)
44+
return req.IsErrorRetryable() || req.IsErrorThrottle()
4745
}
4846

4947
// MaxRetries is the number of times a request may be retried before

0 commit comments

Comments
 (0)