-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid overflow in BackOffDelay and CombineDelay
Although we have MaxDelay option, that only kicks in after the DelayTypeFunc calculation is done, and the calculation itself could overflow. For example, with initial delay of 1 second, the 34th retry would cause the calculated back off delay to go negative, and the 35th retry will cause it to go back to zero. This is loosely ported from our implementation outside of the package: reddit/baseplate.go@660b6c5
- Loading branch information
Showing
2 changed files
with
124 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters