mirror of https://github.com/status-im/consul.git
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
5934f803bf
commit
dfa8d919f7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue