mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Do not assume all HTTP errors as Network errors (#7983)
In situations such as when client uploading data, prematurely disconnects from server such as pressing ctrl-c before uploading all the data. Under this situation in distributed setup we prematurely disconnect disks causing a reconnect loop. This has an adverse affect we end up leaving a lot of files in temporary location which ideally should have been cleaned up when Put() prematurely fails. This is also a regression which got introduced in #7610
This commit is contained in:
committed by
kannappanr
parent
94c88890b8
commit
54eded2e6f
@@ -44,8 +44,8 @@ func isNetworkError(err error) bool {
|
||||
if err.Error() == errConnectionStale.Error() {
|
||||
return true
|
||||
}
|
||||
if _, ok := err.(*rest.NetworkError); ok {
|
||||
return true
|
||||
if nerr, ok := err.(*rest.NetworkError); ok {
|
||||
return isNetworkOrHostDown(nerr.Err)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user