diff --git a/watch/plan.go b/watch/plan.go index 8dc8779687..bb939ae663 100644 --- a/watch/plan.go +++ b/watch/plan.go @@ -57,6 +57,7 @@ OUTER: if err != nil { // Perform an exponential backoff failures++ + p.lastIndex = 0 retry := retryInterval * time.Duration(failures*failures) if retry > maxBackoffTime { retry = maxBackoffTime @@ -85,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