diff --git a/src/bin/proxmox-backup-api.rs b/src/bin/proxmox-backup-api.rs index 9062304a..630d642c 100644 --- a/src/bin/proxmox-backup-api.rs +++ b/src/bin/proxmox-backup-api.rs @@ -81,6 +81,8 @@ async fn run() -> Result<(), Error> { } server.await?; + log::info!("server shutting down, waiting for active workers to complete"); + proxmox_backup::server::last_worker_future().await?; log::info!("done - exit server"); diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs index 788c3e9d..b31f8334 100644 --- a/src/bin/proxmox-backup-proxy.rs +++ b/src/bin/proxmox-backup-proxy.rs @@ -112,6 +112,8 @@ async fn run() -> Result<(), Error> { } server.await?; + log::info!("server shutting down, waiting for active workers to complete"); + proxmox_backup::server::last_worker_future().await?; log::info!("done - exit server"); Ok(())