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

@ -1 +1 @@
Subproject commit 9223a153ae04d415ca88cae7866833c39ba5e604
Subproject commit 1ba798488119d8d31950efca724440feb87cba54

View File

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