From ef19a3705f3f779036b5fc7d2a35a679c799cea9 Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Wed, 20 Sep 2017 11:06:56 +0300 Subject: [PATCH] The initial thread backoff value should not be empty --- src/duplicacy_gcdstorage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/duplicacy_gcdstorage.go b/src/duplicacy_gcdstorage.go index b04ac23..adbbc3c 100644 --- a/src/duplicacy_gcdstorage.go +++ b/src/duplicacy_gcdstorage.go @@ -305,6 +305,10 @@ func CreateGCDStorage(tokenFile string, storagePath string, threads int) (storag backoffsRetries: make([]int, threads), } + for b := range storage.backoffs { + storage.backoffs[b] = 0.1 * float64(storage.numberOfThreads) // at the first error, we should still sleep some amount + } + storagePathID, err := storage.getIDFromPath(0, storagePath) if err != nil { return nil, err