add system info

This commit is contained in:
open-trade
2020-06-21 14:31:52 +08:00
parent 2424dcad69
commit 135d855505
3 changed files with 831 additions and 222 deletions

1047
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -185,6 +185,7 @@ impl RendezvousServer {
if self.pm.is_in_memory(&id) { if self.pm.is_in_memory(&id) {
self.handle_udp_punch_hole_request(addr, id).await?; self.handle_udp_punch_hole_request(addr, id).await?;
} else { } else {
// not in memory, fetch from db with spawn in case blocking me
let mut me = self.clone(); let mut me = self.clone();
tokio::spawn(async move { tokio::spawn(async move {
allow_err!(me.handle_udp_punch_hole_request(addr, id).await); allow_err!(me.handle_udp_punch_hole_request(addr, id).await);
@@ -197,6 +198,9 @@ impl RendezvousServer {
Some(rendezvous_message::Union::local_addr(la)) => { Some(rendezvous_message::Union::local_addr(la)) => {
self.handle_local_addr(&la, addr, Some(socket)).await?; self.handle_local_addr(&la, addr, Some(socket)).await?;
} }
Some(rendezvous_message::Union::system_info(info)) => {
log::info!("{}", info.value);
}
_ => {} _ => {}
} }
} }