mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 22:36:30 +03:00
deltachat-rpc-server: Drop Accounts object when terminating (#4323)
Otherwise it continues to keep the sender side of the event emitter which prevents events_task from stopping.
This commit is contained in:
@@ -115,6 +115,7 @@ async fn main() -> Result<()> {
|
|||||||
// NB: Events are drained by events_task.
|
// NB: Events are drained by events_task.
|
||||||
canceler.cancel();
|
canceler.cancel();
|
||||||
accounts.read().await.stop_io().await;
|
accounts.read().await.stop_io().await;
|
||||||
|
drop(accounts);
|
||||||
drop(state);
|
drop(state);
|
||||||
let (r0, r1) = tokio::join!(events_task, send_task);
|
let (r0, r1) = tokio::join!(events_task, send_task);
|
||||||
for r in [r0, r1] {
|
for r in [r0, r1] {
|
||||||
|
|||||||
Reference in New Issue
Block a user