Set DNS cache size to "0" for trust-dns

Co-authored-by: fernvenue <git@fernvenue.com>
This commit is contained in:
Tim Xylon
2023-06-27 13:22:55 +08:00
committed by ty
co-authored by fernvenue
parent 8f56c5381b
commit 34f822ba9b
@@ -107,6 +107,7 @@ pub async fn create_resolver(dns: Option<ResolverConfig>, connect_opts: ConnectO
// Use Ipv4AndIpv6 strategy. Because Ipv4ThenIpv6 or Ipv6ThenIpv4 will return if the first query returned.
// Since we want to use Happy Eyeballs to connect to both IPv4 and IPv6 addresses, we need both A and AAAA records.
resolver_opts.ip_strategy = LookupIpStrategy::Ipv4AndIpv6;
resolver_opts.cache_size = 0;
trace!(
"initializing DNS resolver with config {:?} opts {:?}",