|
|
@ -59,8 +59,7 @@ grpc_millis BackOff::Step(grpc_exec_ctx* exec_ctx) { |
|
|
|
const double jitter = generate_uniform_random_number_between( |
|
|
|
const double jitter = generate_uniform_random_number_between( |
|
|
|
&rng_state_, -options_.jitter() * current_backoff_, |
|
|
|
&rng_state_, -options_.jitter() * current_backoff_, |
|
|
|
options_.jitter() * current_backoff_); |
|
|
|
options_.jitter() * current_backoff_); |
|
|
|
const grpc_millis next_timeout = std::min( |
|
|
|
const grpc_millis next_timeout = (grpc_millis)(current_backoff_ + jitter); |
|
|
|
(grpc_millis)(current_backoff_ + jitter), options_.max_backoff()); |
|
|
|
|
|
|
|
return next_timeout + grpc_exec_ctx_now(exec_ctx); |
|
|
|
return next_timeout + grpc_exec_ctx_now(exec_ctx); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|