diff --git a/cmd/warm-backend.go b/cmd/warm-backend.go index dc1034e1f..64cec6976 100644 --- a/cmd/warm-backend.go +++ b/cmd/warm-backend.go @@ -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: