From 2f1df392043d5ad049f8ea79756b401e5e842f7f Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 28 May 2015 11:45:37 +0300 Subject: [PATCH] Use S3 retrying transport. #255 --- s3/public.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/s3/public.go b/s3/public.go index 6656a57c..a99e9b36 100644 --- a/s3/public.go +++ b/s3/public.go @@ -6,6 +6,7 @@ import ( "github.com/mitchellh/goamz/s3" "github.com/smira/aptly/aptly" "github.com/smira/aptly/files" + "net/http" "os" "path/filepath" "strings" @@ -46,7 +47,12 @@ func NewPublishedStorageRaw(auth aws.Auth, region aws.Region, bucket, defaultACL storageClass: storageClass, encryptionMethod: encryptionMethod, plusWorkaround: plusWorkaround, - disableMultiDel: disabledMultiDel} + disableMultiDel: disabledMultiDel, + } + + result.s3.HTTPClient = func() *http.Client { + return aws.RetryingClient + } result.bucket = result.s3.Bucket(bucket) return result, nil