diff --git a/agent/local/state.go b/agent/local/state.go index 6a5fac9ff2..67e72aece0 100644 --- a/agent/local/state.go +++ b/agent/local/state.go @@ -838,6 +838,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