mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 05:12:10 +00:00
parent
19daefd04e
commit
f43d34899d
2
vendor/src/github.com/minio/minio-go/api.go
vendored
2
vendor/src/github.com/minio/minio-go/api.go
vendored
@ -553,7 +553,7 @@ func (c Client) executeMethod(method string, metadata requestMetadata) (res *htt
|
|||||||
// Bucket region if set in error response and the error
|
// Bucket region if set in error response and the error
|
||||||
// code dictates invalid region, we can retry the request
|
// code dictates invalid region, we can retry the request
|
||||||
// with the new region.
|
// with the new region.
|
||||||
if errResponse.Code == "InvalidRegion" && errResponse.Region != "" {
|
if errResponse.Region != "" && res.StatusCode == http.StatusBadRequest {
|
||||||
c.bucketLocCache.Set(metadata.bucketName, errResponse.Region)
|
c.bucketLocCache.Set(metadata.bucketName, errResponse.Region)
|
||||||
continue // Retry.
|
continue // Retry.
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user