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

View File

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