From ff966b37af0b989c1e136385bc21c6e74579079a Mon Sep 17 00:00:00 2001 From: Misty Date: Wed, 24 May 2023 15:02:28 +0800 Subject: [PATCH] dropbox: fix result chans not taken care by defer fun --- backend/dropbox/batcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/dropbox/batcher.go b/backend/dropbox/batcher.go index f6fd1ad27..d057724f0 100644 --- a/backend/dropbox/batcher.go +++ b/backend/dropbox/batcher.go @@ -144,7 +144,7 @@ func (b *batcher) commitBatch(ctx context.Context, items []*files.UploadSessionF // If commit fails then signal clients if sync var signalled = b.async defer func() { - if err != nil && signalled { + if err != nil && !signalled { // Signal to clients that there was an error for _, result := range results { result <- batcherResponse{err: err}