mirror of
https://github.com/EasyTier/EasyTier.git
synced 2024-11-16 03:32:43 +08:00
Fix panic when DNS resolution for STUN server returns only IPv6 addrs. (#402)
This commit is contained in:
parent
e344372616
commit
d9453589ac
|
@ -56,6 +56,8 @@ impl HostResolverIter {
|
|||
self.ips = ips
|
||||
.filter(|x| x.is_ipv4())
|
||||
.choose_multiple(&mut rand::thread_rng(), self.max_ip_per_domain as usize);
|
||||
|
||||
if self.ips.is_empty() {return self.next().await;}
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::warn!(?host, ?e, "lookup host for stun failed");
|
||||
|
|
Loading…
Reference in New Issue
Block a user