diff options
author | Mark D. Roth <roth@google.com> | 2018-01-19 11:17:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 11:17:13 -0800 |
commit | 9813858908da2e7deaa58d91f4030e6881e364e3 (patch) | |
tree | 6099e0a962b241d766322ae0684f585501511204 /src/core/ext/filters/client_channel/subchannel.cc | |
parent | 4721b5f265b2fa8fd1462b9f55a79183aff96b2a (diff) | |
parent | 44fe6e282c848d876d516fe6cd79a008d8104604 (diff) |
Merge pull request #14070 from markdroth/backoff_api_cleanup
Combine BackOff Begin() and Step() methods.
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/subchannel.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index fe4fcbbb7d..bb43651d0c 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -373,6 +373,7 @@ static void continue_connect_locked(grpc_subchannel* c) { args.interested_parties = c->pollset_set; const grpc_millis min_deadline = c->min_connect_timeout_ms + grpc_core::ExecCtx::Get()->Now(); + c->next_attempt_deadline = c->backoff->NextAttemptTime(); args.deadline = std::max(c->next_attempt_deadline, min_deadline); args.channel_args = c->args; grpc_connectivity_state_set(&c->state_tracker, GRPC_CHANNEL_CONNECTING, @@ -418,7 +419,6 @@ static void on_alarm(void* arg, grpc_error* error) { } if (error == GRPC_ERROR_NONE) { gpr_log(GPR_INFO, "Failed to connect to channel, retrying"); - c->next_attempt_deadline = c->backoff->Step(); continue_connect_locked(c); gpr_mu_unlock(&c->mu); } else { @@ -454,7 +454,6 @@ static void maybe_start_connecting_locked(grpc_subchannel* c) { if (!c->backoff_begun) { c->backoff_begun = true; - c->next_attempt_deadline = c->backoff->Begin(); continue_connect_locked(c); } else { GPR_ASSERT(!c->have_alarm); |