mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
avoid race condition on scheduler start
This commit is contained in:
@@ -132,8 +132,8 @@ impl Context {
|
||||
panic!("Already running");
|
||||
}
|
||||
|
||||
let scheduler = Scheduler::run(self.clone());
|
||||
*self.inner.scheduler.write().await = scheduler;
|
||||
let l = &mut *self.inner.scheduler.write().await;
|
||||
l.run(self.clone());
|
||||
}
|
||||
|
||||
pub async fn stop(&self) {
|
||||
|
||||
Reference in New Issue
Block a user