mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
properly send heartbeats
fix https://github.com/chrislusf/seaweedfs/issues/476
This commit is contained in:
parent
e936fe9001
commit
a337b844ec
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue