Pop recently seen loop event out of the queue when it's in the past

This commit is contained in:
link2xt
2022-11-14 22:49:06 +00:00
parent c1f9d8f7a1
commit ee34b64f5d
2 changed files with 13 additions and 0 deletions

View File

@@ -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();
}
}
}