aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authoropen-trade <[email protected]>2020-07-09 02:28:36 +0800
committeropen-trade <[email protected]>2020-07-09 02:28:36 +0800
commit41c58538b556200e84535a7848cb7483d7fb24ad (patch)
tree6aafada654b950227557072dc76926f5d6c070ef /src
parentd16fb31ecf2690e1eb84b1881ac8c0f88342d59f (diff)
downloadrustdesk-server-41c58538b556200e84535a7848cb7483d7fb24ad.tar.gz
rustdesk-server-41c58538b556200e84535a7848cb7483d7fb24ad.zip
pass pk to client
Diffstat (limited to 'src')
-rw-r--r--src/rendezvous_server.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs
index 1553d22..326b01a 100644
--- a/src/rendezvous_server.rs
+++ b/src/rendezvous_server.rs
@@ -301,8 +301,13 @@ impl RendezvousServer {
&addr
);
let mut msg_out = RendezvousMessage::new();
+ let pk = match self.pm.get(&phs.id).await {
+ Some(peer) => peer.pk,
+ _ => Vec::new(),
+ };
msg_out.set_punch_hole_response(PunchHoleResponse {
socket_addr: AddrMangle::encode(addr),
+ pk,
..Default::default()
});
if let Some(socket) = socket {