Skip to content

Commit

Permalink
task shutdown fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-es committed Jan 10, 2025
1 parent 2ed0749 commit 44640ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/task/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ impl<EVENT: Send + Sync + Clone + TaskEvent> ConsensusTaskRegistry<EVENT> {
let handles = &mut self.task_handles;

while let Some(handle) = handles.pop() {
let mut task_state = handle.await.unwrap();

task_state.cancel_subtasks();
let _ = handle
.await
.map(|mut task_state| task_state.cancel_subtasks());
}
}
/// Take a task, run it, and register it
Expand Down

0 comments on commit 44640ee

Please sign in to comment.