mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
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:
parent
140af43c26
commit
50f053cada
@ -304,6 +304,9 @@ outer:
|
|||||||
//
|
//
|
||||||
// Can be called from atexit handler
|
// Can be called from atexit handler
|
||||||
func (b *batcher) Shutdown() {
|
func (b *batcher) Shutdown() {
|
||||||
|
if !b.Batching() {
|
||||||
|
return
|
||||||
|
}
|
||||||
b.shutOnce.Do(func() {
|
b.shutOnce.Do(func() {
|
||||||
atexit.Unregister(b.atexit)
|
atexit.Unregister(b.atexit)
|
||||||
fs.Infof(b.f, "Commiting uploads - please wait...")
|
fs.Infof(b.f, "Commiting uploads - please wait...")
|
||||||
|
Loading…
Reference in New Issue
Block a user