Fix integer overflow in futures retrying library
Summary: retryingPolicyCappedJitteredExponentialBackoff had an integer overflow. This occured usually when we had more than 64 retries, since we compute pow(2, n) and then we convert to a 64 bit integer. I added a check that it won't overflow, and if it does, then it returns the max_backoff value. Reviewed By: yfeldblum Differential Revision: D7284952 fbshipit-source-id: 7424f502b8530f8e39ba0513dd70bfc9fdc5c8e5
Showing
Please register or sign in to comment