Skip to content

Commit 42d09d4

Browse files
committed
fix: ChatId::delete_ex(): Interrupt inbox loop
Messages are deleted from the inbox loop, so it should be interrupted. The SMTP doesn't need to be interrupted explicitly however, chat::sync() already does this internally.
1 parent c0e0464 commit 42d09d4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/chat.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=?
687687
context.emit_event(EventType::ChatDeleted { chat_id: self });
688688
context.emit_msgs_changed_without_ids();
689689

690+
context.scheduler.interrupt_inbox().await;
690691
if let Some(id) = sync_id {
691692
self::sync(context, id, SyncAction::Delete)
692693
.await
@@ -703,8 +704,6 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=?
703704
context
704705
.set_config_internal(Config::LastHousekeeping, None)
705706
.await?;
706-
context.scheduler.interrupt_smtp().await;
707-
708707
Ok(())
709708
}
710709

0 commit comments

Comments
 (0)