use random ip from dns record instead of only first one

This commit is contained in:
sijie.sun
2024-08-04 23:10:31 +08:00
committed by Sijie.Sun
parent 2415cb211e
commit b4fbcd8d80
2 changed files with 9 additions and 2 deletions

View File

@@ -316,6 +316,7 @@ impl ManualConnectorManager {
ip_versions.push(IpVersion::Both);
} else {
let addrs = u.socket_addrs(|| Some(1000))?;
tracing::info!(?addrs, ?dead_url, "get ip from url done");
let mut has_ipv4 = false;
let mut has_ipv6 = false;
for addr in addrs {