Skip to content

Commit

Permalink
properly send heartbeats
Browse files Browse the repository at this point in the history
fix #476
  • Loading branch information
chrislusf committed Mar 27, 2017
1 parent e936fe9 commit a337b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weed/server/volume_grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
}
Expand Down

0 comments on commit a337b84

Please sign in to comment.