mirror of https://github.com/ospab/ostp.git
fix(client): fix async closure compilation error in udp_nat.rs
This commit is contained in:
parent
6fa6170c75
commit
6b58e0e8f3
|
|
@ -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];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue