Skip to content

Commit

Permalink
Merge pull request #4331 from capone212/b-3595-fix-heartbeat
Browse files Browse the repository at this point in the history
Fixed #3595
  • Loading branch information
dadgar authored May 25, 2018
2 parents 9b87962 + aa2dc83 commit 3461634
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nomad/heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ func (s *Server) invalidateHeartbeat(id string) {
defer metrics.MeasureSince([]string{"nomad", "heartbeat", "invalidate"}, time.Now())
// Clear the heartbeat timer
s.heartbeatTimersLock.Lock()
delete(s.heartbeatTimers, id)
if timer, ok := s.heartbeatTimers[id]; ok {
timer.Stop()
delete(s.heartbeatTimers, id)
}
s.heartbeatTimersLock.Unlock()

// Do not invalidate the node since we are not the leader. This check avoids
Expand Down

0 comments on commit 3461634

Please sign in to comment.