diff options
author | David Garcia Quintas <dgq@google.com> | 2017-12-04 16:12:54 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2017-12-04 16:12:54 -0800 |
commit | 0f91e513d9dc9bee529701ba254933eb7be07b38 (patch) | |
tree | 87a5af062b2139ebc3969d768105e2687244d7cc /src/core/ext/filters/client_channel/lb_policy | |
parent | 460b5e0cd39c0f3de9f4202dad48c6b4ecd23199 (diff) |
Cleaned up API. Backoff now returns a single value: the time of the next retry
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc | 7 |
1 files changed, 3 insertions, 4 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 cc55925758..3c4e7d0270 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 @@ -398,7 +398,7 @@ typedef struct glb_lb_policy { grpc_slice lb_call_status_details; /** LB call retry backoff state */ - grpc_core::ManualConstructor<grpc_core::Backoff> lb_call_backoff; + grpc_core::ManualConstructor<grpc_core::BackOff> lb_call_backoff; /** LB call retry timer */ grpc_timer lb_call_retry_timer; @@ -1291,8 +1291,7 @@ static void maybe_restart_lb_call(grpc_exec_ctx* exec_ctx, glb_policy->updating_lb_call = false; } else if (!glb_policy->shutting_down) { /* if we aren't shutting down, restart the LB client call after some time */ - grpc_millis next_try = - glb_policy->lb_call_backoff->Step(exec_ctx).next_attempt_start_time; + grpc_millis next_try = glb_policy->lb_call_backoff->Step(exec_ctx); if (grpc_lb_glb_trace.enabled()) { gpr_log(GPR_DEBUG, "[grpclb %p] Connection to LB server lost...", glb_policy); @@ -1461,7 +1460,7 @@ static void lb_call_init_locked(grpc_exec_ctx* exec_ctx, lb_on_response_received_locked, glb_policy, grpc_combiner_scheduler(glb_policy->base.combiner)); - grpc_core::Backoff::Options backoff_options; + grpc_core::BackOff::Options backoff_options; backoff_options .set_initial_backoff(GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * 1000) .set_multiplier(GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER) |