aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/rendezvous_server.rs
diff options
context:
space:
mode:
authorrustdesk <[email protected]>2024-05-24 18:37:11 +0800
committerrustdesk <[email protected]>2024-05-24 18:37:11 +0800
commit5078a1f7971f4b5a507bd7164f1eb960e5195369 (patch)
tree4ec095d45c39892d1be5b0d21d3f9ce6d99e2b57 /src/rendezvous_server.rs
parenta22dacce0c9a0444bdffc5529d8645a599b07374 (diff)
downloadrustdesk-server-5078a1f7971f4b5a507bd7164f1eb960e5195369.tar.gz
rustdesk-server-5078a1f7971f4b5a507bd7164f1eb960e5195369.zip
reuse port, and revert hbbr `-k`1.1.11-1
Diffstat (limited to 'src/rendezvous_server.rs')
-rw-r--r--src/rendezvous_server.rs6
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)
}