mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
Explicitly emit INFO events in stop_io()
This commit is contained in:
@@ -262,7 +262,7 @@ impl Accounts {
|
|||||||
pub async fn stop_io(&self) {
|
pub async fn stop_io(&self) {
|
||||||
// Sending an event here wakes up event loop even
|
// Sending an event here wakes up event loop even
|
||||||
// if there are no accounts.
|
// if there are no accounts.
|
||||||
info!(self, "Stopping IO for all accounts.");
|
self.emit_event(EventType::Info("Stopping IO for all accounts.".to_string()));
|
||||||
for account in self.accounts.values() {
|
for account in self.accounts.values() {
|
||||||
account.stop_io().await;
|
account.stop_io().await;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ impl SchedulerState {
|
|||||||
// For this, the caller needs to instruct the event poller
|
// For this, the caller needs to instruct the event poller
|
||||||
// to terminate on receiving the next event and then call stop_io()
|
// to terminate on receiving the next event and then call stop_io()
|
||||||
// which will emit the below event(s)
|
// which will emit the below event(s)
|
||||||
info!(context, "stopping IO");
|
context.emit_event(EventType::Info("Stopping IO.".to_string()));
|
||||||
if let Some(debug_logging) = context.debug_logging.read().await.as_ref() {
|
if let Some(debug_logging) = context.debug_logging.read().await.as_ref() {
|
||||||
debug_logging.loop_handle.abort();
|
debug_logging.loop_handle.abort();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user