mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
imap: refactor to always create Imap configured
`Imap` structure is always created in a configured state now. There is no default value for `ImapConfig` anymore. Also resultify Scheduler::start() to fail on database errors, for example if IMAP configuration cannot be read from the database during `start_io()`. Previosuly errors during reading keys such as `mvbox_watch` were simply ignored and folders were not watched until the application is completely restarted, now start_io() will fail and scheduler will only be started at the next start_io() call which usually happens when app is brought to the foreground.
This commit is contained in:
@@ -161,7 +161,9 @@ impl Context {
|
||||
|
||||
{
|
||||
let l = &mut *self.inner.scheduler.write().await;
|
||||
l.start(self.clone()).await;
|
||||
if let Err(err) = l.start(self.clone()).await {
|
||||
error!(self, "Failed to start IO: {}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user