mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
add disk.Close() in healFreshDisk to indicate idiomatic flow of code (#16124)
This commit is contained in:
parent
fe8eed963e
commit
ce53d7f6c2
@ -292,7 +292,7 @@ func healFreshDisk(ctx context.Context, z *erasureServerPools, endpoint Endpoint
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error: %w, %s", err, endpoint)
|
||||
}
|
||||
|
||||
defer disk.Close()
|
||||
poolIdx := globalEndpoints.GetLocalPoolIdx(disk.Endpoint())
|
||||
if poolIdx < 0 {
|
||||
return fmt.Errorf("unexpected pool index (%d) found in %s", poolIdx, disk.Endpoint())
|
||||
|
Loading…
Reference in New Issue
Block a user