mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
Convert 'server closed idle connection' to errDiskNotFound (#16548)
This commit is contained in:
parent
a451d1cb8d
commit
ffd57fde90
@ -50,9 +50,18 @@ func isNetworkError(err error) bool {
|
|||||||
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
// A peer node can be in shut down phase and proactively
|
// A peer node can be in shut down phase and proactively
|
||||||
// return 503 server closed error,consider it as an offline node
|
// return 503 server closed error,consider it as an offline node
|
||||||
return err.Error() == http.ErrServerClosed.Error()
|
case strings.Contains(err.Error(), http.ErrServerClosed.Error()):
|
||||||
|
return true
|
||||||
|
// Corner case, the server closed the connection with a keep-alive timeout
|
||||||
|
// some requests are not retried internally, such as POST request with written body
|
||||||
|
case strings.Contains(err.Error(), "server closed idle connection"):
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Converts network error to storageErr. This function is
|
// Converts network error to storageErr. This function is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user