diff --git a/core/pool/src/event.rs b/core/pool/src/event.rs index 20730e6f3..47684a4c4 100644 --- a/core/pool/src/event.rs +++ b/core/pool/src/event.rs @@ -418,7 +418,10 @@ where task.abort(); } self.ongoing_async_tasks.clear(); - while !matches!(self.event_queue.try_recv(), Err(TryRecvError::Empty)) {} + while !matches!( + self.event_queue.try_recv(), + Err(TryRecvError::Empty | TryRecvError::Disconnected) + ) {} }, "POOL: spawn" );