mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2024-11-24 04:12:34 +08:00
fix ID_EXISTS not sent out due to ipv6 change
This commit is contained in:
parent
49f10a288d
commit
ec202209f3
@ -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(())
|
||||
|
Loading…
Reference in New Issue
Block a user