diff --git a/cmd/erasure.go b/cmd/erasure.go index e601d46a9..3a27a280c 100644 --- a/cmd/erasure.go +++ b/cmd/erasure.go @@ -517,6 +517,11 @@ func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, bf } else { 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 }