1
0

spawn relay task manager into separate tasks

This commit is contained in:
EAimTY 2022-07-01 23:47:03 +09:00
parent 9267ec45cf
commit 63c7ee3e1d

View File

@ -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) => {}
}
};