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. 2
      weed/server/raft_server_handlers.go

2
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.MaxInterval = 1 * time.Second
expBackoff.MaxElapsedTime = 5 * time.Second expBackoff.MaxElapsedTime = 5 * time.Second
isLocked, err := backoff.RetryWithData(s.topo.IsChildLocked, expBackoff) isLocked, err := backoff.RetryWithData(s.topo.IsChildLocked, expBackoff)
if err != nil {
glog.Errorf("HealthzHandler: %+v", err) glog.Errorf("HealthzHandler: %+v", err)
}
if isLocked { if isLocked {
w.WriteHeader(http.StatusLocked) w.WriteHeader(http.StatusLocked)
return return

Loading…
Cancel
Save