mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
tier verification leaks fd, that must be closed (#16296)
Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
parent
6423e4c767
commit
29dd7f1d68
@ -25,6 +25,7 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/minio/madmin-go/v2"
|
||||
xhttp "github.com/minio/minio/internal/http"
|
||||
)
|
||||
|
||||
// WarmBackendGetOpts is used to express byte ranges within an object. The zero
|
||||
@ -60,7 +61,8 @@ func checkWarmBackend(ctx context.Context, w WarmBackend) error {
|
||||
}
|
||||
}
|
||||
|
||||
_, err = w.Get(ctx, probeObject, rv, WarmBackendGetOpts{})
|
||||
r, err := w.Get(ctx, probeObject, rv, WarmBackendGetOpts{})
|
||||
xhttp.DrainBody(r)
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case BackendDown:
|
||||
@ -78,7 +80,6 @@ func checkWarmBackend(ctx context.Context, w WarmBackend) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err = w.Remove(ctx, probeObject, rv); err != nil {
|
||||
switch err.(type) {
|
||||
case BackendDown:
|
||||
|
Loading…
x
Reference in New Issue
Block a user