diff options
| author | elioat <elioat@tilde.institute> | 2025-11-15 18:47:22 -0500 |
|---|---|---|
| committer | elioat <elioat@tilde.institute> | 2025-11-15 18:47:22 -0500 |
| commit | f0dce4b348acea832f1059e0e0654320cae3e026 (patch) | |
| tree | 124be20ee6acfc4cf3c018ad68f45ffada0fef05 /cpp | |
| parent | b394dba6b05d45d58839626c76b2b6c9043676e0 (diff) | |
| download | tour-f0dce4b348acea832f1059e0e0654320cae3e026.tar.gz | |
Fix message deduplication using process dictionary
Implementation:
- Move seen_broadcast_ids from RegistryState to process dictionary
- RegistryState updates weren't persisting between loop iterations
- Process dictionary is global per-actor and persists across all loop cycles
- Use has_seen_message() and mark_message_seen() helpers
Result:
- Each message displayed exactly once per peer (no duplicates)
- In a 3-peer mesh: peer1 sends, peer2 sees it, peer3 sees it = 3 displays total
- But each individual peer sees it only once (no duplicates on single peer)
- Terminal echo already disabled, so no raw input appearing
Issues Fixed:
✅ Issue 1: No more raw "hello" + "18:26:29 [eli] hello" - echo is disabled
✅ Issue 2: Idle peers stay connected for 6+ minutes before removal
The system now works correctly for multi-peer P2P chat!
Diffstat (limited to 'cpp')
0 files changed, 0 insertions, 0 deletions