diff options
Diffstat (limited to 'src/rendezvous_server.rs')
-rw-r--r-- | src/rendezvous_server.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 0c0d107..bb99ee0 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -1294,19 +1294,19 @@ async fn send_rk_res( async fn create_udp_listener(port: i32, rmem: usize) -> ResultType<FramedSocket> { let addr = SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), port as _); - if let Ok(s) = FramedSocket::new_reuse(&addr, false, rmem).await { + if let Ok(s) = FramedSocket::new_reuse(&addr, true, rmem).await { log::debug!("listen on udp {:?}", s.local_addr()); return Ok(s); } let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), port as _); - let s = FramedSocket::new_reuse(&addr, false, rmem).await?; + let s = FramedSocket::new_reuse(&addr, true, rmem).await?; log::debug!("listen on udp {:?}", s.local_addr()); Ok(s) } #[inline] async fn create_tcp_listener(port: i32) -> ResultType<TcpListener> { - let s = listen_any(port as _).await?; + let s = listen_any(port as _, true).await?; log::debug!("listen on tcp {:?}", s.local_addr()); Ok(s) } |