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:
iequidoo
2023-04-15 20:06:05 -04:00
committed by iequidoo
parent 6a6ceb6875
commit a8b790a5db

View File

@@ -115,6 +115,7 @@ async fn main() -> Result<()> {
// NB: Events are drained by events_task.
canceler.cancel();
accounts.read().await.stop_io().await;
drop(accounts);
drop(state);
let (r0, r1) = tokio::join!(events_task, send_task);
for r in [r0, r1] {