"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
pacer: fix b2 deadlock by defaulting max connections to unlimited
Nick Craig-Wood96438ff259a7
diff --git a/fs/pacer.go b/fs/pacer.goindex c8bac2230..00515623a 100644--- a/fs/pacer.go+++ b/fs/pacer.go@@ -29,7 +29,7 @@ func NewPacer(ctx context.Context, c pacer.Calculator) *Pacer {p := &Pacer{Pacer: pacer.New(pacer.InvokerOption(pacerInvoker),- pacer.MaxConnectionsOption(ci.Checkers+ci.Transfers),+ // pacer.MaxConnectionsOption(ci.Checkers+ci.Transfers),pacer.RetriesOption(retries),pacer.CalculatorOption(c),),diff --git a/lib/pacer/pacer.go b/lib/pacer/pacer.goindex 4b1cbb37b..6cfcb84d6 100644--- a/lib/pacer/pacer.go+++ b/lib/pacer/pacer.go@@ -75,7 +75,7 @@ type Paced func() (bool, error)// New returns a Pacer with sensible defaults.func New(options ...Option) *Pacer {opts := pacerOptions{- maxConnections: 10,+ maxConnections: 0,retries: 3,}for _, o := range options {@@ -103,7 +103,7 @@ func New(options ...Option) *Pacer {// SetMaxConnections sets the maximum number of concurrent connections.// Setting the value to 0 will allow unlimited number of connections.// Should not be changed once you have started calling the pacer.-// By default this will be set to fs.Config.Checkers.+// By default this will be 0.func (p *Pacer) SetMaxConnections(n int) {p.mu.Lock()defer p.mu.Unlock()