From 23e84ecc12e85f5f4e7347e12783192a2beaaead Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 11 Jan 2017 13:24:23 -0800 Subject: [PATCH] Random wait --- client/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 0732875c7..6a960a832 100644 --- a/client/client.go +++ b/client/client.go @@ -1305,8 +1305,9 @@ func (c *Client) watchAllocations(updates chan *allocUpdates) { if _, ok := pulledAllocs[desiredID]; !ok { // We didn't get everything we wanted. Do not update the // MinQueryIndex, sleep and then retry. + wait := c.retryIntv(2 * time.Second) select { - case <-time.After(2 * time.Second): + case <-time.After(wait): // Wait for the server we contact to receive the // allocations continue