Skip to content

Commit

Permalink
Update source/exponential_backoff_retry_strategy.c
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Graeb <[email protected]>
  • Loading branch information
waahm7 and graebm authored Jul 19, 2023
1 parent b8bbd44 commit 328e40a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/exponential_backoff_retry_strategy.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ typedef uint64_t(compute_backoff_fn)(struct exponential_backoff_retry_token *tok

static uint64_t s_compute_no_jitter(struct exponential_backoff_retry_token *token) {
uint64_t retry_count = aws_min_u64(aws_atomic_load_int(&token->current_retry_count), 63);
return aws_min_u64(
token->maximum_backoff_ns, aws_mul_u64_saturating((uint64_t)1 << retry_count, token->backoff_scale_factor_ns));
uint64_t backoff_ns = aws_mul_u64_saturating((uint64_t)1 << retry_count, token->backoff_scale_factor_ns);
return aws_min_u64(backoff_ns, token->maximum_backoff_ns);
}

static uint64_t s_compute_full_jitter(struct exponential_backoff_retry_token *token) {
Expand Down

0 comments on commit 328e40a

Please sign in to comment.