mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00:00
storage: Return errDiskNotFound when a peer is during shutdown (#15868)
This commit is contained in:
parent
bd3dfad8b9
commit
0506d9e83d
1 changed files with 5 additions and 1 deletions
|
@ -25,6 +25,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
|
@ -48,7 +49,10 @@ func isNetworkError(err error) bool {
|
|||
if nerr, ok := err.(*rest.NetworkError); ok {
|
||||
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
||||
}
|
||||
return false
|
||||
|
||||
// A peer node can be in shut down phase and proactively
|
||||
// return 503 server closed error,consider it as an offline node
|
||||
return err.Error() == http.ErrServerClosed.Error()
|
||||
}
|
||||
|
||||
// Converts network error to storageErr. This function is
|
||||
|
|
Loading…
Reference in a new issue