Fix corruption of blocking_resolve_address when ares is used and grpc is restarted

pull/16917/head
Alexander Polcyn 6 years ago
parent 61b542f912
commit aa3259c10e
  1. 4
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc

@ -473,7 +473,9 @@ void grpc_resolver_dns_ares_init() {
GRPC_LOG_IF_ERROR("ares_library_init() failed", error);
return;
}
default_resolver = grpc_resolve_address_impl;
if (default_resolver == nullptr) {
default_resolver = grpc_resolve_address_impl;
}
grpc_set_resolver_impl(&ares_resolver);
grpc_core::ResolverRegistry::Builder::RegisterResolverFactory(
grpc_core::UniquePtr<grpc_core::ResolverFactory>(

Loading…
Cancel
Save