Browse Source

avoid logging nil error (#4659)

Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
pull/4663/head
Konstantin Lebedev 1 year ago
committed by GitHub
parent
commit
2c076ebd96
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/server/raft_server_handlers.go

4
weed/server/raft_server_handlers.go

@ -41,7 +41,9 @@ func (s *RaftServer) HealthzHandler(w http.ResponseWriter, r *http.Request) {
expBackoff.MaxInterval = 1 * time.Second
expBackoff.MaxElapsedTime = 5 * time.Second
isLocked, err := backoff.RetryWithData(s.topo.IsChildLocked, expBackoff)
glog.Errorf("HealthzHandler: %+v", err)
if err != nil {
glog.Errorf("HealthzHandler: %+v", err)
}
if isLocked {
w.WriteHeader(http.StatusLocked)
return

Loading…
Cancel
Save