Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

accounting: Fix stats (speed=0 and eta=nil) when starting jobs via rc

Nick Craig-Wood4b777db20be4
diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go
index a14c59c55..64f160953 100644
--- a/fs/accounting/stats.go
+++ b/fs/accounting/stats.go
@@ -368,7 +368,7 @@ func (s *StatsInfo) averageLoop(ctx context.Context) {
// Call with the mutex held
func (s *StatsInfo) _startAverageLoop() {
if !s.average.started {
- ctx, cancel := context.WithCancel(s.ctx)
+ ctx, cancel := context.WithCancel(context.Background())
s.average.cancel = cancel
s.average.started = true
s.average.stopped.Add(1)