mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
accounts: interrupt event loop from Accounts.stop_io()
This allows to interrupt event loop via dc_accounts_stop_io() even if there are no accounts.
This commit is contained in:
@@ -277,6 +277,9 @@ impl Accounts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn stop_io(&self) {
|
pub async fn stop_io(&self) {
|
||||||
|
// Sending an event here wakes up event loop even
|
||||||
|
// if there are no accounts.
|
||||||
|
info!(self, "Stopping IO for all accounts");
|
||||||
for account in self.accounts.values() {
|
for account in self.accounts.values() {
|
||||||
account.stop_io().await;
|
account.stop_io().await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user