server/state: add spawn_internal_task and use it for websockets
is a helper to spawn an internal tokio task without it showing up in the task list it is still tracked for reload and notifies the last_worker_listeners this enables the console to survive a reload of proxmox-backup-proxy Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
224c65f8de
commit
33a88dafb9
@ -267,7 +267,7 @@ fn upgrade_to_websocket(
|
||||
|
||||
let (ws, response) = WebSocket::new(parts.headers)?;
|
||||
|
||||
tokio::spawn(async move {
|
||||
crate::server::spawn_internal_task(async move {
|
||||
let conn: Upgraded = match req_body.on_upgrade().map_err(Error::from).await {
|
||||
Ok(upgraded) => upgraded,
|
||||
_ => bail!("error"),
|
||||
|
Reference in New Issue
Block a user