Skip to content

Commit 4dbc7f8

Browse files
committed
remove future after it has failed
1 parent e262338 commit 4dbc7f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ async fn main() -> anyhow::Result<()> {
6262
info!("shutting down on signal SIGTERM");
6363
Ok(())
6464
}
65-
task_ended = select_all(&mut futures) => {
65+
(result, idx, _) = select_all(&mut futures) => {
6666
warn!("shutting down because task unexpectedly ended");
67-
task_ended.0?
67+
futures.remove(idx);
68+
result?
6869
}
6970
};
7071
shutdown_tx.send(true)?;

0 commit comments

Comments
 (0)