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
This commit is contained in:
Nick Craig-Wood 2022-07-12 12:13:58 +01:00
parent d96789e1b8
commit 74401077dc
1 changed files with 3 additions and 0 deletions

View File

@ -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...")