From f265afa8aca9e6a2d78963b79c54bc0bf2ff0460 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 12 Dec 2014 22:09:43 -0800 Subject: [PATCH] discovery: fix watch index --- discovery/discovery.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discovery/discovery.go b/discovery/discovery.go index 3dbb7b470..b1e7bd7ef 100644 --- a/discovery/discovery.go +++ b/discovery/discovery.go @@ -276,7 +276,8 @@ func (d *discovery) waitNodes(nodes client.Nodes, size int, index uint64) (clien if len(nodes) > size { nodes = nodes[:size] } - w := d.c.RecursiveWatch(d.cluster, index) + // watch from the next index + w := d.c.RecursiveWatch(d.cluster, index+1) all := make(client.Nodes, len(nodes)) copy(all, nodes) for _, n := range all {