diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-01 14:23:10 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-01 14:23:10 +0200 |
commit | 22d96929d5416750e1f5889ee6cc16b382293104 (patch) | |
tree | 7b9407132ffa02fa5c7e9f6040f90f0e071b4bf3 /src/server.rs | |
parent | 4a59b73d7bfd0f136f654e874afb5d2a9bf4df2e (diff) | |
parent | d75146fb8157dd03c156e5f7ce4834fa1d72b581 (diff) | |
download | netapp-22d96929d5416750e1f5889ee6cc16b382293104.tar.gz netapp-22d96929d5416750e1f5889ee6cc16b382293104.zip |
Merge branch 'fix-ping' into stream-body
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.rs b/src/server.rs index f8c3f98..2c12d9d 100644 --- a/src/server.rs +++ b/src/server.rs @@ -103,14 +103,17 @@ impl ServerConn { netapp.connected_as_server(peer_id, conn.clone()); + let debug_name = format!("SRV {}", hex::encode(&peer_id[..8])); + let debug_name_2 = debug_name.clone(); + let conn2 = conn.clone(); let recv_future = tokio::spawn(async move { select! { - r = conn2.recv_loop(read) => r, + r = conn2.recv_loop(read, debug_name_2) => r, _ = await_exit(must_exit) => Ok(()) } }); - let send_future = tokio::spawn(conn.clone().send_loop(resp_recv, write)); + let send_future = tokio::spawn(conn.clone().send_loop(resp_recv, write, debug_name)); recv_future.await.log_err("ServerConn recv_loop"); conn.resp_send.store(None); |