Skip to content

Commit

Permalink
emit disable before exit
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed May 4, 2024
1 parent b0fa664 commit a0a6a13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ func (cr *Cluster) handleDownload(rw http.ResponseWriter, req *http.Request, has
}
if err == storage.ErrNotWorking {
log.Errorf("All storages are down, exit.")
tctx, _ := context.WithTimeout(context.TODO(), time.Second * 10)
cr.Disable(tctx)
osExit(CodeClientOrEnvionmentError)
}
return
Expand Down

0 comments on commit a0a6a13

Please sign in to comment.