diff options
author | David Garcia Quintas <dgq@google.com> | 2017-12-07 10:25:25 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2017-12-07 10:25:25 -0800 |
commit | a5e2da4096c88a5302d8c460c705c9453a389975 (patch) | |
tree | 36d7ff6e64b752fd4e3783d71ee5a2025ca5e157 /src/core/ext/filters/client_channel | |
parent | fa4126f0cb0eb266225704deb75b38a5b935d527 (diff) |
Do the Step() in the right place
Diffstat (limited to 'src/core/ext/filters/client_channel')
-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 77e20f025a..0db0f48faa 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -402,10 +402,8 @@ static void continue_connect_locked(grpc_exec_ctx* exec_ctx, args.interested_parties = c->pollset_set; const grpc_millis min_deadline = (c->min_connect_timeout_ms * 1000) + grpc_exec_ctx_now(exec_ctx); - c->next_attempt_deadline = c->backoff->Step(exec_ctx); args.deadline = std::max(c->next_attempt_deadline, min_deadline); args.channel_args = c->args; - grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE, "state_change"); @@ -451,6 +449,7 @@ static void on_alarm(grpc_exec_ctx* exec_ctx, 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(exec_ctx); continue_connect_locked(exec_ctx, c); gpr_mu_unlock(&c->mu); } else { |