Closed xsc closed 8 years ago
Hold on, this might break the ClojureScript version (since Long/MAX_VALUE
is not available).
Hi Yannick,
How's this?: https://github.com/ptaoussanis/encore/commit/aecdb2c061ba3005c63de278ab7626ba33890792
Calls with larger n's shouldn't generally occur in realistic situations since the backoff quickly approaches infinity.
LGTM, thanks!
An exception is thrown when calling
exp-backoff
with highernattempt
, e.g.:This fixes the issue by ensuring that the result, before applying
:min
and:max
, does not exceed Long/MAX_VALUE.