volume: reset leader if error happens

This commit is contained in:
Chris Lu 2019-04-15 09:09:46 -07:00
parent e85048bcdc
commit 6e116b3d67

View file

@ -41,6 +41,7 @@ func (vs *VolumeServer) heartbeat() {
if err != nil { if err != nil {
glog.V(0).Infof("heartbeat error: %v", err) glog.V(0).Infof("heartbeat error: %v", err)
time.Sleep(time.Duration(vs.pulseSeconds) * time.Second) time.Sleep(time.Duration(vs.pulseSeconds) * time.Second)
newLeader = ""
} }
} }
} }