dropbox: fix result chans not taken care by defer fun

This commit is contained in:
Misty 2023-05-24 15:02:28 +08:00 committed by Nick Craig-Wood
parent 3b6effa81a
commit ff966b37af
1 changed files with 1 additions and 1 deletions

View File

@ -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}