Skip to content

Commit

Permalink
Merge 06d4c72 into backport/gh-18429-deferrcheck-leak/blatantly-defin…
Browse files Browse the repository at this point in the history
…ite-pony
  • Loading branch information
hc-github-team-consul-core authored Aug 23, 2023
2 parents e836b1e + 06d4c72 commit 6f448ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/local/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f448ed

Please sign in to comment.