aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/lb_policy/grpclb
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-01-11 18:31:13 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2018-01-11 18:31:13 -0800
commitdfa2851462809a459dd734090c221ea322064c7d (patch)
treeca74377c9701531620003091888ea5632399ad2b /src/core/ext/filters/client_channel/lb_policy/grpclb
parent70fbe6261376f5e0bf7a9c62f3809730d8c93e3c (diff)
PR comments, round 2
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy/grpclb')
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc8
1 files changed, 5 insertions, 3 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 5849ac9d2d..39467272b3 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
@@ -322,7 +322,7 @@ static void pending_pick_set_metadata_and_context(pending_pick* pp) {
/* if connected_subchannel is nullptr, no pick has been made by the RR
* policy (e.g., all addresses failed to connect). There won't be any
* user_data/token available */
- if (pp->pick->connected_subchannel != nullptr) {
+ if (pp->pick->connected_subchannel.get() != nullptr) {
if (!GRPC_MDISNULL(pp->lb_token)) {
initial_metadata_add_lb_token(pp->pick->initial_metadata,
&pp->pick->lb_token_mdelem_storage,
@@ -935,7 +935,8 @@ static void glb_shutdown_locked(grpc_lb_policy* pol,
}
gpr_free(pp);
} else {
- pp->pick->connected_subchannel = nullptr;
+ pp->pick->connected_subchannel =
+ grpc_core::MakeRefCounted<grpc_core::ConnectedSubchannel>(nullptr);
GRPC_CLOSURE_SCHED(&pp->on_complete, GRPC_ERROR_REF(error));
}
pp = next;
@@ -972,7 +973,8 @@ static void glb_cancel_pick_locked(grpc_lb_policy* pol,
while (pp != nullptr) {
pending_pick* next = pp->next;
if (pp->pick == pick) {
- pick->connected_subchannel = nullptr;
+ pick->connected_subchannel =
+ grpc_core::MakeRefCounted<grpc_core::ConnectedSubchannel>(nullptr);
GRPC_CLOSURE_SCHED(&pp->on_complete,
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"Pick Cancelled", &error, 1));