diff options
author | rustdesk <[email protected]> | 2023-02-18 13:41:45 +0800 |
---|---|---|
committer | rustdesk <[email protected]> | 2023-02-18 13:41:45 +0800 |
commit | ec202209f31a77dd36dd2ba44d5c062a066ec6f5 (patch) | |
tree | f568e84fd066f4a9b3d823c497cdca2b87ff7f96 /src | |
parent | 49f10a288de045d8b1125a1a3fba9e47ac4da7d3 (diff) | |
download | rustdesk-server-ec202209f31a77dd36dd2ba44d5c062a066ec6f5.tar.gz rustdesk-server-ec202209f31a77dd36dd2ba44d5c062a066ec6f5.zip |
fix ID_EXISTS not sent out due to ipv6 change
Diffstat (limited to 'src')
-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 924c1a2..39dc13c 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -789,7 +789,7 @@ impl RendezvousServer { #[inline] async fn send_to_tcp(&mut self, msg: RendezvousMessage, addr: SocketAddr) { - let mut tcp = self.tcp_punch.lock().await.remove(&addr); + let mut tcp = self.tcp_punch.lock().await.remove(&try_into_v4(addr)); tokio::spawn(async move { Self::send_to_sink(&mut tcp, msg).await; }); @@ -817,7 +817,7 @@ impl RendezvousServer { msg: RendezvousMessage, addr: SocketAddr, ) -> ResultType<()> { - let mut sink = self.tcp_punch.lock().await.remove(&addr); + let mut sink = self.tcp_punch.lock().await.remove(&try_into_v4(addr)); Self::send_to_sink(&mut sink, msg).await; Ok(()) } @@ -1126,7 +1126,7 @@ impl RendezvousServer { } } if sink.is_none() { - self.tcp_punch.lock().await.remove(&addr); + self.tcp_punch.lock().await.remove(&try_into_v4(addr)); } log::debug!("Tcp connection from {:?} closed", addr); Ok(()) |