Skip to content
Snippets Groups Projects
Commit 5068fa45 authored by Yang Gao's avatar Yang Gao
Browse files

Merge pull request #2982 from ctiller/tsan-race

Fix TSAN reported race
parents 6d8d0144 376076b3
No related branches found
No related tags found
No related merge requests found
...@@ -505,13 +505,13 @@ static void cc_on_config_changed(void *arg, int iomgr_success) { ...@@ -505,13 +505,13 @@ static void cc_on_config_changed(void *arg, int iomgr_success) {
if (iomgr_success && chand->resolver) { if (iomgr_success && chand->resolver) {
grpc_resolver *resolver = chand->resolver; grpc_resolver *resolver = chand->resolver;
GRPC_RESOLVER_REF(resolver, "channel-next"); GRPC_RESOLVER_REF(resolver, "channel-next");
grpc_connectivity_state_set(&chand->state_tracker, state,
"new_lb+resolver");
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
GRPC_CHANNEL_INTERNAL_REF(chand->master, "resolver"); GRPC_CHANNEL_INTERNAL_REF(chand->master, "resolver");
grpc_resolver_next(resolver, &chand->incoming_configuration, grpc_resolver_next(resolver, &chand->incoming_configuration,
&chand->on_config_changed); &chand->on_config_changed);
GRPC_RESOLVER_UNREF(resolver, "channel-next"); GRPC_RESOLVER_UNREF(resolver, "channel-next");
grpc_connectivity_state_set(&chand->state_tracker, state,
"new_lb+resolver");
if (lb_policy != NULL) { if (lb_policy != NULL) {
watch_lb_policy(chand, lb_policy, state); watch_lb_policy(chand, lb_policy, state);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment