1. avoid dns query hangs the thread
2. avoid deadloop when stun query failed because of no ipv4 addr.
3. make quic input error non-fatal.
4. remove ring tunnel from connection map to avoid mem leak.
5. limit listener retry count.
This commit is contained in:
Sijie.Sun
2025-07-21 23:18:38 +08:00
committed by GitHub
parent 876d550f68
commit 4f53fccd25
7 changed files with 62 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ use tokio::{
};
use crate::{
common::{join_joinset_background, PeerId},
common::{dns::socket_addrs, join_joinset_background, PeerId},
peers::peer_conn::PeerConnId,
proto::{
cli::{
@@ -373,7 +373,7 @@ impl ManualConnectorManager {
if u.scheme() == "ring" || u.scheme() == "txt" || u.scheme() == "srv" {
ip_versions.push(IpVersion::Both);
} else {
let addrs = match u.socket_addrs(|| Some(1000)) {
let addrs = match socket_addrs(&u, || Some(1000)).await {
Ok(addrs) => addrs,
Err(e) => {
data.global_ctx.issue_event(GlobalCtxEvent::ConnectError(