From cddda67e308701a14e3c85b78a75d7fd8b4c99ba Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 10 Mar 2016 16:18:20 -0800 Subject: [PATCH] client: fix bug where pushing allocs is skipped --- client/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index ce54fce53ae6..081dd26f5c9e 100644 --- a/client/client.go +++ b/client/client.go @@ -1001,10 +1001,9 @@ func (c *Client) watchAllocations(updates chan *allocUpdates) { } // Update the query index. - if resp.Index <= req.MinQueryIndex { - continue + if resp.Index > req.MinQueryIndex { + req.MinQueryIndex = resp.Index } - req.MinQueryIndex = resp.Index // Push the updates. pulled := make(map[string]*structs.Allocation, len(allocsResp.Allocs))