mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 06:56:29 +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) {
|
||||
// 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() {
|
||||
account.stop_io().await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user