diff --git a/agent/local/state.go b/agent/local/state.go index 5a037313b369b..efccdaf681241 100644 --- a/agent/local/state.go +++ b/agent/local/state.go @@ -834,6 +834,12 @@ func (l *State) setCheckStateLocked(c *CheckState) { existing := l.checks[id] if existing != nil { c.InSync = c.Check.IsSame(existing.Check) + // If the existing check has a Defercheck, it needs to be + // assigned to the new check + if existing.DeferCheck != nil && c.DeferCheck == nil { + c.DeferCheck = existing.DeferCheck + c.InSync = false + } } l.checks[id] = c