1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-16 08:13:20 +00:00

The initial thread backoff value should not be empty

This commit is contained in:
TheBestPessimist
2017-09-20 11:06:56 +03:00
parent fc71cb1b49
commit ef19a3705f

View File

@@ -305,6 +305,10 @@ func CreateGCDStorage(tokenFile string, storagePath string, threads int) (storag
backoffsRetries: make([]int, threads), 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) storagePathID, err := storage.getIDFromPath(0, storagePath)
if err != nil { if err != nil {
return nil, err return nil, err