From be1b7f986e55756ac83b3807ee1d73929fbb3546 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 12 Jan 2018 14:01:38 -0800 Subject: PR comments, round 3 --- .../ext/filters/client_channel/lb_policy/pick_first/pick_first.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/ext/filters/client_channel/lb_policy/pick_first') diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index c91a305f33..725b78d478 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -294,7 +294,7 @@ static void pf_update_locked(grpc_lb_policy* policy, p, p->selected->subchannel, i, subchannel_list->num_subchannels); } - if (p->selected->connected_subchannel) { + if (p->selected->connected_subchannel != nullptr) { sd->connected_subchannel = p->selected->connected_subchannel; } p->selected = sd; @@ -458,8 +458,6 @@ static void pf_connectivity_changed_locked(void* arg, grpc_error* error) { // Cases 1 and 2. grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, "connecting_ready"); - sd->connected_subchannel = - grpc_subchannel_get_connected_subchannel(sd->subchannel); p->selected = sd; if (grpc_lb_pick_first_trace.enabled()) { gpr_log(GPR_INFO, "Pick First %p selected subchannel %p", (void*)p, -- cgit v1.2.3