mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
fix: refactor background heal for cluster health (#10225)
This commit is contained in:
@@ -976,7 +976,11 @@ func (s *peerRESTServer) BackgroundHealStatusHandler(w http.ResponseWriter, r *h
|
||||
|
||||
ctx := newContext(r, w, "BackgroundHealStatus")
|
||||
|
||||
state := getLocalBackgroundHealStatus()
|
||||
state, ok := getLocalBackgroundHealStatus()
|
||||
if !ok {
|
||||
s.writeErrorResponse(w, errServerNotInitialized)
|
||||
return
|
||||
}
|
||||
|
||||
defer w.(http.Flusher).Flush()
|
||||
logger.LogIf(ctx, gob.NewEncoder(w).Encode(state))
|
||||
|
||||
Reference in New Issue
Block a user