Wait for updates collector when disk.NSScanner returns error (#14127)

This commit is contained in:
Krishnan Parthasarathi 2022-01-19 00:46:43 -08:00 committed by GitHub
parent 1a56ebea70
commit 070c31eac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,6 +517,11 @@ func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, bf
} else { } else {
logger.LogIf(ctx, err) logger.LogIf(ctx, err)
} }
// This ensures that we don't close
// bucketResults channel while the
// updates-collector goroutine still
// holds a reference to this.
wg.Wait()
continue continue
} }