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);
|
connection::manage_connection(config, conn, conn_lock, incoming_tx, wait_req);
|
||||||
|
|
||||||
let task = async move {
|
let task = async move {
|
||||||
log::info!("[relay] Started. Target server: {}", server_addr);
|
log::info!("[relay] Started. Target server: {server_addr}");
|
||||||
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
() = manage_connection => (),
|
_ = tokio::spawn(manage_connection) => {}
|
||||||
() = listen_requests => (),
|
_ = tokio::spawn(listen_requests) => {}
|
||||||
() = listen_incoming => (),
|
_ = tokio::spawn(listen_incoming) => {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user