Browse Source

bug: prevent go routine leakage due to existing DeferCheck

pull/18558/head
cskh 1 year ago
parent
commit
06d4c72f68
  1. 6
      agent/local/state.go

6
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

Loading…
Cancel
Save