Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ben1009 authored and ti-chi-bot committed Jun 25, 2021
1 parent 6576a0c commit a5354c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/retry/retry_with_opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func getBackoffInMs(backoffBaseInMs, backoffCapInMs, try float64) time.Duration
temp = 1
}
sleep := temp + rand.Int63n(temp)

backOff := math.Min(backoffCapInMs, float64(rand.Int63n(sleep*3))+backoffBaseInMs)
return time.Duration(math.Min(backoffCapInMs, backOff)) * time.Millisecond
return time.Duration(backOff) * time.Millisecond
}

0 comments on commit a5354c8

Please sign in to comment.