From 63c7ee3e1dc76d34138dde65765b088862c036b8 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Fri, 1 Jul 2022 23:47:03 +0900 Subject: [PATCH] spawn relay task manager into separate tasks --- client/src/relay/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/relay/mod.rs b/client/src/relay/mod.rs index dac61ad..a0ea1d1 100644 --- a/client/src/relay/mod.rs +++ b/client/src/relay/mod.rs @@ -66,12 +66,12 @@ pub async fn init( connection::manage_connection(config, conn, conn_lock, incoming_tx, wait_req); let task = async move { - log::info!("[relay] Started. Target server: {}", server_addr); + log::info!("[relay] Started. Target server: {server_addr}"); tokio::select! { - () = manage_connection => (), - () = listen_requests => (), - () = listen_incoming => (), + _ = tokio::spawn(manage_connection) => {} + _ = tokio::spawn(listen_requests) => {} + _ = tokio::spawn(listen_incoming) => {} } };