Skip to content

Commit

Permalink
reset the watch index when somehow the index goes backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmen committed Jan 17, 2017
1 parent 021cc20 commit d7b5f41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions watch/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d7b5f41

Please sign in to comment.