aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-16 10:12:12 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-16 10:12:12 -0700
commit8f3addcc4d8822b68f3c2367353dac38eb56c38c (patch)
treea207328a07d78791489d29333ff9dae77e1cff41 /src
parent36c86e2a8348a69dcddff4ce8dbfbaf155423234 (diff)
Propagate workqueue from resolver --> lb_policy
Diffstat (limited to 'src')
-rw-r--r--src/core/client_config/resolvers/dns_resolver.c2
-rw-r--r--src/core/client_config/resolvers/sockaddr_resolver.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/core/client_config/resolvers/dns_resolver.c b/src/core/client_config/resolvers/dns_resolver.c
index b519ce4174..cbc96ca992 100644
--- a/src/core/client_config/resolvers/dns_resolver.c
+++ b/src/core/client_config/resolvers/dns_resolver.c
@@ -146,8 +146,10 @@ static void dns_on_resolved(void *arg, grpc_resolved_addresses *addresses) {
subchannels[i] = grpc_subchannel_factory_create_subchannel(
r->subchannel_factory, &args);
}
+ memset(&lb_policy_args, 0, sizeof(lb_policy_args));
lb_policy_args.subchannels = subchannels;
lb_policy_args.num_subchannels = addresses->naddrs;
+ lb_policy_args.workqueue = r->workqueue;
lb_policy = grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
grpc_client_config_set_lb_policy(config, lb_policy);
GRPC_LB_POLICY_UNREF(lb_policy, "construction");
diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c
index 260bee27a9..cb3b6070f2 100644
--- a/src/core/client_config/resolvers/sockaddr_resolver.c
+++ b/src/core/client_config/resolvers/sockaddr_resolver.c
@@ -137,8 +137,10 @@ static void sockaddr_maybe_finish_next_locked(sockaddr_resolver *r) {
subchannels[i] = grpc_subchannel_factory_create_subchannel(
r->subchannel_factory, &args);
}
+ memset(&lb_policy_args, 0, sizeof(lb_policy_args));
lb_policy_args.subchannels = subchannels;
lb_policy_args.num_subchannels = r->num_addrs;
+ lb_policy_args.workqueue = r->workqueue;
lb_policy =
grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args);
gpr_free(subchannels);