From 74401077dcb98eb669cffb90d521dea97d16d948 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 12 Jul 2022 12:13:58 +0100 Subject: [PATCH] dropbox: fix hang on quit with --dropbox-batch-mode off This problem was created by the fact that we are much more diligent about calling Shutdown now, and the dropbox backend had a hang if the batch mode was "off" in the Shutdown method. See: https://forum.rclone.org/t/dropbox-lsjson-in-1-59-stuck-on-commiting-upload/31853 --- backend/dropbox/batcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/dropbox/batcher.go b/backend/dropbox/batcher.go index ac87c71e0..874bb93d9 100644 --- a/backend/dropbox/batcher.go +++ b/backend/dropbox/batcher.go @@ -304,6 +304,9 @@ outer: // // Can be called from atexit handler func (b *batcher) Shutdown() { + if !b.Batching() { + return + } b.shutOnce.Do(func() { atexit.Unregister(b.atexit) fs.Infof(b.f, "Commiting uploads - please wait...")