properly send heartbeats

fix https://github.com/chrislusf/seaweedfs/issues/476
This commit is contained in:
Chris Lu 2017-03-27 10:11:52 -07:00
parent e936fe9001
commit a337b844ec

View file

@ -82,7 +82,7 @@ func (vs *VolumeServer) doHeartbeat(sleepInterval time.Duration) error {
return err
}
tickChan := time.NewTimer(sleepInterval).C
tickChan := time.Tick(sleepInterval)
for {
select {
@ -92,6 +92,7 @@ func (vs *VolumeServer) doHeartbeat(sleepInterval time.Duration) error {
return err
}
case err := <-doneChan:
glog.V(0).Infof("Volume Server heart beat stops with %v", err)
return err
}
}