mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: close chan before return in scanner usage updates (#16960)
This commit is contained in:
parent
699a24f7e5
commit
6e359c586e
@ -175,10 +175,12 @@ func (p *xlStorageDiskIDCheck) Healing() *healingTracker {
|
||||
|
||||
func (p *xlStorageDiskIDCheck) NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode) (dataUsageCache, error) {
|
||||
if contextCanceled(ctx) {
|
||||
close(updates)
|
||||
return dataUsageCache{}, ctx.Err()
|
||||
}
|
||||
|
||||
if err := p.checkDiskStale(); err != nil {
|
||||
close(updates)
|
||||
return dataUsageCache{}, err
|
||||
}
|
||||
return p.storage.NSScanner(ctx, cache, updates, scanMode)
|
||||
|
Loading…
Reference in New Issue
Block a user