diff options
| author | 2024-09-26 12:43:10 +0000 | |
|---|---|---|
| committer | 2024-09-26 14:43:10 +0200 | |
| commit | 53ee6aef0885b4055ef95bf4f20ee78fd381e333 (patch) | |
| tree | a181b038dc969482b34690603328dd6b756a42fb /vendor/github.com/minio/minio-go/v7/retry.go | |
| parent | [chore] reduce number admin process workers (#3354) (diff) | |
| download | gotosocial-53ee6aef0885b4055ef95bf4f20ee78fd381e333.tar.xz | |
[bugfix] s3 media uploaded without content-type (#3353)
* update go-storage dependency, for S3Storage manually call PutObject() so we can set content-type
* update calls to PutFile() to include the contentType
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/retry.go')
| -rw-r--r-- | vendor/github.com/minio/minio-go/v7/retry.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/retry.go b/vendor/github.com/minio/minio-go/v7/retry.go index 5ddcad897..d15eb5901 100644 --- a/vendor/github.com/minio/minio-go/v7/retry.go +++ b/vendor/github.com/minio/minio-go/v7/retry.go @@ -129,9 +129,10 @@ func isHTTPStatusRetryable(httpStatusCode int) (ok bool) { } // For now, all http Do() requests are retriable except some well defined errors -func isRequestErrorRetryable(err error) bool { +func isRequestErrorRetryable(ctx context.Context, err error) bool { if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { - return false + // Retry if internal timeout in the HTTP call. + return ctx.Err() == nil } if ue, ok := err.(*url.Error); ok { e := ue.Unwrap() |
