Skip to content

Commit

Permalink
sneak in fix for other new time.After use
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Sep 29, 2023
1 parent 891d2c9 commit c7bab36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2423,16 +2423,18 @@ OUTER:
// Node.GetClientAllocs which returns older results.
if allocsResp.Index <= allocsReq.MinQueryIndex {
retry := c.retryIntv(getAllocRetryIntv)
timer, stop := helper.NewSafeTimer(retry)
c.logger.Warn("failed to retrieve updated allocs; retrying",
"req_index", allocsReq.MinQueryIndex,
"resp_index", allocsResp.Index,
"num_allocs", len(pull),
"wait", retry,
)
select {
case <-time.After(retry):
case <-timer.C:
continue
case <-c.shutdownCh:
stop()
return
}
}
Expand Down

0 comments on commit c7bab36

Please sign in to comment.