fix(call-to-play): compact expired snapshots
Expired call histories were removed on the next store insertion, so an otherwise idle peer could continue carrying stale payload through handshakes after the five-minute UI retention ended. Run the same inactive-call compaction before local and handshake snapshots. This makes the expiry boundary exact without trimming any event from an active call. Test Plan: - `just fmt` -- passed - `just clippy` -- passed - `just test` -- passed, 147 peer tests - `git diff --cached --check` -- passed
This commit is contained in:
3 files changed
+11
-8
No files matched your search
@@ -510,7 +510,7 @@ async fn handle_peer_commands(
|
||||
let _ = reply.send(result);
|
||||
}
|
||||
PeerCommand::GetCallToPlayEvents { reply } => {
|
||||
let events = ctx.call_to_play.read().await.snapshot();
|
||||
let events = ctx.call_to_play.write().await.snapshot();
|
||||
events::send(tx_notify_ui, PeerEvent::CallToPlayEvents(events.clone()));
|
||||
if let Some(reply) = reply {
|
||||
let _ = reply.send(events);
|
||||
|
||||
Reference in new issue
Block a user