diff --git a/src/main.rs b/src/main.rs index 43f6679..03ad41c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,9 +62,10 @@ async fn main() -> anyhow::Result<()> { info!("shutting down on signal SIGTERM"); Ok(()) } - task_ended = select_all(&mut futures) => { + (result, idx, _) = select_all(&mut futures) => { warn!("shutting down because task unexpectedly ended"); - task_ended.0? + futures.remove(idx); + result? } }; shutdown_tx.send(true)?;