Browse Source

add system info

open-trade 5 years ago
parent
commit
135d855505
3 changed files with 827 additions and 218 deletions
  1. 822 217
      Cargo.lock
  2. 1 1
      libs/hbb_common
  3. 4 0
      src/rendezvous_server.rs

File diff suppressed because it is too large
+ 822 - 217
Cargo.lock


+ 1 - 1
libs/hbb_common

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

+ 4 - 0
src/rendezvous_server.rs

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