mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
avoid crash if disks are not initialized
This commit is contained in:
@@ -102,6 +102,11 @@ func storageServerRequestValidate(r *http.Request) error {
|
||||
|
||||
// IsValid - To authenticate and verify the time difference.
|
||||
func (s *storageRESTServer) IsValid(w http.ResponseWriter, r *http.Request) bool {
|
||||
if s.storage == nil {
|
||||
s.writeErrorResponse(w, errDiskNotFound)
|
||||
return false
|
||||
}
|
||||
|
||||
if err := storageServerRequestValidate(r); err != nil {
|
||||
s.writeErrorResponse(w, err)
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user