diff --git a/cmd/storage-rest-client.go b/cmd/storage-rest-client.go index d2721b76f..6779a2969 100644 --- a/cmd/storage-rest-client.go +++ b/cmd/storage-rest-client.go @@ -46,10 +46,14 @@ func isNetworkError(err error) bool { if err == nil { return false } + if nerr, ok := err.(*rest.NetworkError); ok { - return xnet.IsNetworkOrHostDown(nerr.Err, false) + if down := xnet.IsNetworkOrHostDown(nerr.Err, false); down { + return true + } } + // More corner cases suitable for storage REST API switch { // A peer node can be in shut down phase and proactively // return 503 server closed error,consider it as an offline node