aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2017-11-03 07:48:16 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2017-11-03 07:48:16 -0700
commitf6c6b92c02612a3fcce3b52dece257ad34c04cff (patch)
tree4ad757e02f0dbc7978943d586bd855d0a350b77f
parent88933d803b148b02ecb7aad9a0395a72439d578f (diff)
PR comments
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc10
1 files changed, 4 insertions, 6 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 a5f8c59252..82c9482f76 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
@@ -1169,7 +1169,7 @@ static int glb_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
const grpc_connectivity_state rr_connectivity_state =
grpc_lb_policy_check_connectivity_locked(exec_ctx,
glb_policy->rr_policy, NULL);
- // The glb_policy->rr_policy may have transition to SHUTDOWN but the
+ // The glb_policy->rr_policy may have transitioned to SHUTDOWN but the
// callback registered to capture this event
// (glb_rr_connectivity_changed_locked) may not have been invoked yet. We
// need to make sure we aren't trying to pick from a RR policy instance
@@ -1182,9 +1182,9 @@ static int glb_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
grpc_connectivity_state_name(rr_connectivity_state));
}
// Attempt to switch over to a pending update.
- rr_handover_locked(exec_ctx, glb_policy);
add_pending_pick(&glb_policy->pending_picks, pick_args, target, context,
on_complete);
+ rr_handover_locked(exec_ctx, glb_policy);
pick_done = false;
} else { // RR not in shutdown
if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
@@ -1192,10 +1192,8 @@ static int glb_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
(void *)glb_policy, (void *)glb_policy->rr_policy);
}
GRPC_LB_POLICY_REF(glb_policy->rr_policy, "glb_pick");
-
- wrapped_rr_closure_arg *wc_arg =
- (wrapped_rr_closure_arg *)gpr_zalloc(sizeof(wrapped_rr_closure_arg));
-
+ wrapped_rr_closure_arg *wc_arg =
+ (wrapped_rr_closure_arg *)gpr_zalloc(sizeof(wrapped_rr_closure_arg));
GRPC_CLOSURE_INIT(&wc_arg->wrapper_closure, wrapped_rr_closure, wc_arg,
grpc_schedule_on_exec_ctx);
wc_arg->rr_policy = glb_policy->rr_policy;