mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid logging nil error (#4659)
Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
This commit is contained in:
parent
3730772e05
commit
2c076ebd96
|
@ -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)
|
||||||
glog.Errorf("HealthzHandler: %+v", err)
|
if err != nil {
|
||||||
|
glog.Errorf("HealthzHandler: %+v", err)
|
||||||
|
}
|
||||||
if isLocked {
|
if isLocked {
|
||||||
w.WriteHeader(http.StatusLocked)
|
w.WriteHeader(http.StatusLocked)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue