diff options
author | 2017-11-03 15:05:23 +0100 | |
---|---|---|
committer | 2017-11-03 15:05:23 +0100 | |
commit | ef68fe7239a89095f1eaa89c1dd28b2b7be2a3c7 (patch) | |
tree | 34f22ce323db985f5599943e2cbe8a4bf80cfe6c /src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc | |
parent | fb57c665c643508cf1593ee33e7544b7f2447a86 (diff) | |
parent | eca25f374681ee19fb02bf1bb6f765009242fee4 (diff) |
Merge pull request #13121 from dgquintas/backoff_spec
Improvements to C Core's backoff code and API
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 85e76e68b5..03116b420c 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -1266,7 +1266,8 @@ static void maybe_restart_lb_call(grpc_exec_ctx *exec_ctx, } else if (!glb_policy->shutting_down) { /* if we aren't shutting down, restart the LB client call after some time */ grpc_millis next_try = - grpc_backoff_step(exec_ctx, &glb_policy->lb_call_backoff_state); + grpc_backoff_step(exec_ctx, &glb_policy->lb_call_backoff_state) + .next_attempt_start_time; if (GRPC_TRACER_ON(grpc_lb_glb_trace)) { gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...", (void *)glb_policy); @@ -1431,7 +1432,7 @@ static void lb_call_init_locked(grpc_exec_ctx *exec_ctx, grpc_combiner_scheduler(glb_policy->base.combiner)); grpc_backoff_init(&glb_policy->lb_call_backoff_state, - GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS, + GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * 1000, GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER, GRPC_GRPCLB_RECONNECT_JITTER, GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS * 1000, |