fix: leaking offline disks in MarkOffline() thread (#18414)

`monitorAndConnectEndpoints` will continue to attempt to reconnect offline disks.

Since disks were never closed, a `MarkOffline` would continue to try to check these disks forever.

Close previous disks.
This commit is contained in:
Klaus Post 2023-11-09 09:33:32 -08:00 committed by GitHub
parent 6ef8e87492
commit 2229509362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ func (s *erasureSets) connectDisks() {
continue continue
} }
} }
if cdisk != nil {
// Close previous offline disk.
cdisk.Close()
}
wg.Add(1) wg.Add(1)
go func(endpoint Endpoint) { go func(endpoint Endpoint) {