"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
Amazon Cloud Drive: retry on 400, 401, 408, 504 and EOF errors - fixes #340
Nick Craig-Wood8cd3c25b414c
diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.goindex dc8dfb0a7..f1853c130 100644--- a/amazonclouddrive/amazonclouddrive.go+++ b/amazonclouddrive/amazonclouddrive.go@@ -129,14 +129,21 @@ func parsePath(path string) (root string) {// retryErrorCodes is a slice of error codes that we will retryvar retryErrorCodes = []int{+ 400, // Bad request (seen in "Next token is expired")+ 401, // Unauthorized (seen in "Token has expired")+ 408, // Request Timeout429, // Rate exceeded.500, // Get occasional 500 Internal Server Error503, // Service Unavailable+ 504, // Gateway Time-out}// shouldRetry returns a boolean as to whether this resp and err// deserve to be retried. It returns the err as a conveniencefunc shouldRetry(resp *http.Response, err error) (bool, error) {+ if err == io.EOF {+ return true, err+ }return fs.ShouldRetry(err) || fs.ShouldRetryHTTP(resp, retryErrorCodes), err}