mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-10-12 03:34:26 +00:00
This commit is contained in:
@@ -425,16 +425,8 @@ impl RendezvousServer {
|
|||||||
socket.send(&msg_out, addr).await?
|
socket.send(&msg_out, addr).await?
|
||||||
}
|
}
|
||||||
Some(rendezvous_message::Union::PunchHoleRequest(ph)) => {
|
Some(rendezvous_message::Union::PunchHoleRequest(ph)) => {
|
||||||
if self.pm.is_in_memory(&ph.id).await {
|
// UDP PunchHoleRequest is intentionally unsupported.
|
||||||
self.handle_udp_punch_hole_request(addr, ph, key).await?;
|
// The supported client path sends PunchHoleRequest over TCP/WS.
|
||||||
} else {
|
|
||||||
// not in memory, fetch from db with spawn in case blocking me
|
|
||||||
let mut me = self.clone();
|
|
||||||
let key = key.to_owned();
|
|
||||||
tokio::spawn(async move {
|
|
||||||
allow_err!(me.handle_udp_punch_hole_request(addr, ph, &key).await);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Some(rendezvous_message::Union::PunchHoleSent(phs)) => {
|
Some(rendezvous_message::Union::PunchHoleSent(phs)) => {
|
||||||
self.handle_hole_sent(phs, addr, Some(socket)).await?;
|
self.handle_hole_sent(phs, addr, Some(socket)).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user