From 6b58e0e8f3f52ea6a4675be035b6eede2ce224a8 Mon Sep 17 00:00:00 2001 From: ospab Date: Sat, 30 May 2026 02:03:56 +0300 Subject: [PATCH] fix(client): fix async closure compilation error in udp_nat.rs --- ostp-client/src/tunnel/udp_nat.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ostp-client/src/tunnel/udp_nat.rs b/ostp-client/src/tunnel/udp_nat.rs index d1e34eb..a385119 100644 --- a/ostp-client/src/tunnel/udp_nat.rs +++ b/ostp-client/src/tunnel/udp_nat.rs @@ -98,7 +98,10 @@ async fn start_udp_session( let udp = match relay_addr { 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];