diff --git a/CHANGELOG.md b/CHANGELOG.md index e28aed5ed..d82a9a0af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### Fixes - improve IMAP logging, in particular fix incorrect "IMAP IDLE protocol timed out" message on network error during IDLE #3749 +- pop Recently Seen Loop event out of the queue when it is in the past + to avoid busy looping #3753 ## 1.100.0 diff --git a/src/contact.rs b/src/contact.rs index 374a13cca..98bfd2b82 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -1543,6 +1543,17 @@ impl RecentlySeenLoop { unseen_queue.push((Reverse(timestamp + SEEN_RECENTLY_SECONDS), contact_id)); } } + } else { + info!( + context, + "Recently seen loop is not waiting, event is already due." + ); + + // Event is already in the past. + if let Some(contact_id) = contact_id { + context.emit_event(EventType::ContactsChanged(Some(*contact_id))); + } + unseen_queue.pop(); } } }