mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
fix: await the tasks after aborting them
This commit is contained in:
@@ -1913,8 +1913,13 @@ impl RecentlySeenLoop {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
pub(crate) fn abort(self) {
|
||||
pub(crate) async fn abort(self) {
|
||||
self.handle.abort();
|
||||
|
||||
// Await aborted task to ensure the `Future` is dropped
|
||||
// with all resources moved inside such as the `Context`
|
||||
// reference to `InnerContext`.
|
||||
self.handle.await.ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user