mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00:00
Convert 'server closed idle connection' to errDiskNotFound (#16548)
This commit is contained in:
parent
a451d1cb8d
commit
ffd57fde90
1 changed files with 10 additions and 1 deletions
|
@ -50,9 +50,18 @@ func isNetworkError(err error) bool {
|
|||
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
||||
}
|
||||
|
||||
switch {
|
||||
// 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()
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue