From 18fb86b7be830a10b9eb5234a4ad05d9bc04c804 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Tue, 18 Oct 2022 11:01:16 +0100 Subject: [PATCH] convert context.DeadlineExceed to offline disk in DiskInfo() (#15886) --- cmd/erasure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/erasure.go b/cmd/erasure.go index 7dcf58ca4..f24fa12e0 100644 --- a/cmd/erasure.go +++ b/cmd/erasure.go @@ -108,7 +108,7 @@ func (d byDiskTotal) Less(i, j int) bool { func diskErrToDriveState(err error) (state string) { switch { - case errors.Is(err, errDiskNotFound): + case errors.Is(err, errDiskNotFound) || errors.Is(err, context.DeadlineExceeded): state = madmin.DriveStateOffline case errors.Is(err, errCorruptedFormat): state = madmin.DriveStateCorrupt