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 140af43c26
commit 50f053cada

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