mirror of https://github.com/status-im/consul.git
reset the watch index when somehow the index goes backwards
This commit is contained in:
parent
021cc2017d
commit
d7b5f41447
|
@ -86,6 +86,9 @@ OUTER:
|
|||
if oldIndex != 0 && reflect.DeepEqual(p.lastResult, result) {
|
||||
continue
|
||||
}
|
||||
if p.lastIndex < oldIndex {
|
||||
p.lastIndex = 0
|
||||
}
|
||||
|
||||
// Handle the updated result
|
||||
p.lastResult = result
|
||||
|
|
Loading…
Reference in New Issue