mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
convert context.DeadlineExceed to offline disk in DiskInfo() (#15886)
This commit is contained in:
parent
58a8275e84
commit
18fb86b7be
@ -108,7 +108,7 @@ func (d byDiskTotal) Less(i, j int) bool {
|
|||||||
|
|
||||||
func diskErrToDriveState(err error) (state string) {
|
func diskErrToDriveState(err error) (state string) {
|
||||||
switch {
|
switch {
|
||||||
case errors.Is(err, errDiskNotFound):
|
case errors.Is(err, errDiskNotFound) || errors.Is(err, context.DeadlineExceeded):
|
||||||
state = madmin.DriveStateOffline
|
state = madmin.DriveStateOffline
|
||||||
case errors.Is(err, errCorruptedFormat):
|
case errors.Is(err, errCorruptedFormat):
|
||||||
state = madmin.DriveStateCorrupt
|
state = madmin.DriveStateCorrupt
|
||||||
|
Loading…
Reference in New Issue
Block a user