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:
ogidow 2019-12-10 20:02:21 +09:00 committed by Hans Hasselberg
parent 5934f803bf
commit dfa8d919f7
1 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,8 @@ func (idx WaitIndexVal) Next(previous BlockingParamVal) BlockingParamVal {
return idx
}
prevIdx, ok := previous.(WaitIndexVal)
if ok && prevIdx > idx {
// This value is smaller than the previous index, reset.
if ok && prevIdx == idx {
// This value is the same as the previous index, reset
return WaitIndexVal(0)
}
return idx