spawn relay task manager into separate tasks
This commit is contained in:
parent
9267ec45cf
commit
63c7ee3e1d
@ -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) => {}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user