isServerResolvable its sufficient to check server is reachable (#11609)
using isServerResolvable for expiration can lead to chicken and egg problems, a lock might expire knowingly when server is booting up causing perpetual locks getting expired.
This commit is contained in:
@@ -205,14 +205,6 @@ func isServerResolvable(endpoint Endpoint, timeout time.Duration) error {
|
||||
}
|
||||
xhttp.DrainBody(resp.Body)
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return StorageErr(resp.Status)
|
||||
}
|
||||
|
||||
if resp.Header.Get(xhttp.MinIOServerStatus) == unavailable {
|
||||
return StorageErr(unavailable)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user