mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 02:45:42 +03:00
Merge pull request #4331 from capone212/b-3595-fix-heartbeat
Fixed #3595
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user