From 46dd79047479970c6ad6a661ed1489fb68c3184e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Feb 2017 09:42:16 -0800 Subject: [PATCH] Fixes, review comments --- src/core/ext/client_channel/client_channel.c | 2 +- src/core/ext/lb_policy/grpclb/grpclb.c | 1 + src/core/ext/lb_policy/pick_first/pick_first.c | 4 ++-- src/core/ext/lb_policy/round_robin/round_robin.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1321a4d2993..21ba4301ff0 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -183,7 +183,7 @@ typedef struct client_channel_channel_data { grpc_pollset_set *interested_parties; /* the following properties are guarded by a mutex since API's require them - to be instantaniously available */ + to be instantaneously available */ gpr_mu info_mu; char *info_lb_policy_name; /** service config in JSON form */ diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index ccae2625337..b5210cb046e 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -588,6 +588,7 @@ static grpc_lb_policy *create_rr_locked( grpc_lb_policy_args args; memset(&args, 0, sizeof(args)); args.client_channel_factory = glb_policy->cc_factory; + args.combiner = glb_policy->base.combiner; grpc_lb_addresses *addresses = process_serverlist_locked(exec_ctx, serverlist); diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 22585e26185..501cb6d94df 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -60,7 +60,7 @@ typedef struct { /** remaining members are protected by the combiner */ - /** the selected channel (a grpc_connected_subchannel) */ + /** the selected channel */ grpc_connected_subchannel *selected; /** have we started picking? */ @@ -200,7 +200,7 @@ static int pf_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, return 1; } - /* No subchannel selected yet, so acquire lock and then attempt again */ + /* No subchannel selected yet, so try again */ if (!p->started_picking) { start_picking(exec_ctx, p); } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 6637a1fb84c..687df170ad7 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -745,7 +745,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed_locked, sd, - grpc_combiner_scheduler(p->base.combiner, false)); + grpc_combiner_scheduler(args->combiner, false)); } } if (subchannel_idx == 0) {