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:
link2xt
2022-06-13 18:36:23 +00:00
parent d2d788662a
commit 252ef4dbfb

View File

@@ -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;
}