diff --git a/weed/replication/sink/azuresink/azure_sink.go b/weed/replication/sink/azuresink/azure_sink.go index 90d901c76..e2d41edf7 100644 --- a/weed/replication/sink/azuresink/azure_sink.go +++ b/weed/replication/sink/azuresink/azure_sink.go @@ -74,10 +74,19 @@ func (g *AzureSink) initialize(accountName, accountKey, container, dir string) e } serviceURL := fmt.Sprintf("https://%s.blob.core.windows.net/", accountName) - client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, nil) - if err != nil { - return fmt.Errorf("failed to create Azure client: %v", err) - } +client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, &azblob.ClientOptions{ + ClientOptions: azcore.ClientOptions{ + Retry: policy.RetryOptions{ + MaxRetries: 10, + TryTimeout: time.Minute, + RetryDelay: 2 * time.Second, + MaxRetryDelay: time.Minute, + }, + }, +}) +if err != nil { + return fmt.Errorf("failed to create Azure client: %v", err) +} g.client = client