convert context.DeadlineExceed to offline disk in DiskInfo() (#15886)

This commit is contained in:
Anis Elleuch 2022-10-18 11:01:16 +01:00 committed by GitHub
parent 58a8275e84
commit 18fb86b7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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