diff options
author | David Garcia Quintas <dgq@google.com> | 2016-05-18 11:00:31 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-05-18 11:00:31 -0700 |
commit | d013e9b98538710680ced4c3241ab60df9a66190 (patch) | |
tree | 637bae50948c98235f08db0a89cb2ac6008ea1ac /src/core/ext/client_config | |
parent | 604490973b219aa69ee67c252173fa60cadb24b1 (diff) | |
parent | fcbe7daf832dcb616fc93ca59c3b1aab279f510e (diff) |
Merge branch 'master' of github.com:grpc/grpc into lb_pollset_propagation
Diffstat (limited to 'src/core/ext/client_config')
-rw-r--r-- | src/core/ext/client_config/resolver_registry.c | 8 | ||||
-rw-r--r-- | src/core/ext/client_config/subchannel_call_holder.c | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/ext/client_config/resolver_registry.c b/src/core/ext/client_config/resolver_registry.c index 07f29bcb27..e7a4abd568 100644 --- a/src/core/ext/client_config/resolver_registry.c +++ b/src/core/ext/client_config/resolver_registry.c @@ -47,7 +47,6 @@ static int g_number_of_resolvers = 0; static char *g_default_resolver_prefix; void grpc_resolver_registry_init(const char *default_resolver_prefix) { - g_number_of_resolvers = 0; g_default_resolver_prefix = gpr_strdup(default_resolver_prefix); } @@ -57,6 +56,13 @@ void grpc_resolver_registry_shutdown(void) { grpc_resolver_factory_unref(g_all_of_the_resolvers[i]); } gpr_free(g_default_resolver_prefix); + // FIXME(ctiller): this should live in grpc_resolver_registry_init, + // however that would have the client_config plugin call this AFTER we start + // registering resolvers from third party plugins, and so they'd never show + // up. + // We likely need some kind of dependency system for plugins.... what form + // that takes is TBD. + g_number_of_resolvers = 0; } void grpc_register_resolver_type(grpc_resolver_factory *factory) { diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 02f63acd3b..e4dbbb0a36 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -175,6 +175,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL); holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; if (holder->connected_subchannel == NULL) { + gpr_atm_no_barrier_store(&holder->subchannel_call, 1); fail_locked(exec_ctx, holder); } else if (1 == gpr_atm_acq_load(&holder->subchannel_call)) { /* already cancelled before subchannel became ready */ |