Fix shutdown process on macos

reviewable/pr7771/r17
Yuchen Zeng 8 years ago
parent 7496218b9e
commit eb799b78b3
  1. 8
      src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c

@ -332,7 +332,13 @@ void grpc_resolver_dns_ares_init(void) {
gpr_free(resolver); gpr_free(resolver);
} }
void grpc_resolver_dns_ares_shutdown(void) { grpc_ares_cleanup(); } void grpc_resolver_dns_ares_shutdown(void) {
char *resolver = gpr_getenv("GRPC_DNS_RESOLVER");
if (resolver != NULL && gpr_stricmp(resolver, "ares") == 0) {
grpc_ares_cleanup();
}
gpr_free(resolver);
}
#else /* GRPC_ARES == 1 && !defined(GRPC_UV) */ #else /* GRPC_ARES == 1 && !defined(GRPC_UV) */

Loading…
Cancel
Save