Skip to content

Commit

Permalink
Random wait
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jan 11, 2017
1 parent 925622a commit 23e84ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23e84ec

Please sign in to comment.