agent: fix watch event behavior (#5265)
Use an equality match on the last event id, not a small value, to correct the random nature of the trigger
This commit is contained in:
parent
442924c35a
commit
c7db07fc2a
|
@ -88,8 +88,8 @@ func (idx WaitIndexVal) Next(previous BlockingParamVal) BlockingParamVal {
|
||||||
return idx
|
return idx
|
||||||
}
|
}
|
||||||
prevIdx, ok := previous.(WaitIndexVal)
|
prevIdx, ok := previous.(WaitIndexVal)
|
||||||
if ok && prevIdx > idx {
|
if ok && prevIdx == idx {
|
||||||
// This value is smaller than the previous index, reset.
|
// This value is the same as the previous index, reset
|
||||||
return WaitIndexVal(0)
|
return WaitIndexVal(0)
|
||||||
}
|
}
|
||||||
return idx
|
return idx
|
||||||
|
|
Loading…
Reference in New Issue