fix(client): fix async closure compilation error in udp_nat.rs

This commit is contained in:
ospab 2026-05-30 02:03:56 +03:00
parent f3f2cf1c17
commit 3a39f19b45
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ async fn start_udp_session(
let udp = match relay_addr { let udp = match relay_addr {
SocketAddr::V4(_) => UdpSocket::bind("127.0.0.1:0").await?, SocketAddr::V4(_) => UdpSocket::bind("127.0.0.1:0").await?,
SocketAddr::V6(_) => UdpSocket::bind("[::1]:0").await.or_else(|_| UdpSocket::bind("[::]:0").await)?, SocketAddr::V6(_) => match UdpSocket::bind("[::1]:0").await {
Ok(sock) => sock,
Err(_) => UdpSocket::bind("[::]:0").await?,
},
}; };
let mut buf = vec![0u8; 65536]; let mut buf = vec![0u8; 65536];