--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -811,7 +811,7 @@ }; bool ShouldUseAres(y_absl::string_view resolver_env) { - return resolver_env.empty() || y_absl::EqualsIgnoreCase(resolver_env, "ares"); + return !resolver_env.empty() && y_absl::EqualsIgnoreCase(resolver_env, "ares"); } bool UseAresDnsResolver() {