From 252ef4dbfb55a88213d2a6aae34e204fa7b9e76a Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 13 Jun 2022 18:36:23 +0000 Subject: [PATCH] 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. --- src/accounts.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/accounts.rs b/src/accounts.rs index d153dfc24..6d142d1a7 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -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; }