pass pk to client

This commit is contained in:
open-trade 2020-07-09 02:28:36 +08:00
parent d16fb31ecf
commit 41c58538b5
2 changed files with 6 additions and 1 deletions

@ -1 +1 @@
Subproject commit c86ebe2402ee1f092ce8e44e89368234708a766f
Subproject commit 45ef8cd75fcc7c94634cafcefddccd31353fdfac

View File

@ -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 {