rwadurian/backend/mpc-system/services/message-router/domain
hailin 549b21f298 fix(message-router): prevent subscription race condition on gRPC reconnect
When a party re-subscribes (e.g., Android reconnects), the old gRPC stream's
defer Unsubscribe() was accidentally removing the NEW subscription from the
subscribers map, causing the party to miss session_started events.

Fix:
- Subscribe() now returns the channel to the caller
- Unsubscribe() now takes the channel and only removes if it matches
- This prevents older streams from removing newer subscriptions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 10:04:11 -08:00
..
entities refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
repositories feat(mpc-system): integrate reliability mechanisms and enable party-driven architecture 2025-12-05 20:30:03 -08:00
party_registry.go feat(mpc-system): integrate reliability mechanisms and enable party-driven architecture 2025-12-05 20:30:03 -08:00
session_event_broadcaster.go fix(message-router): prevent subscription race condition on gRPC reconnect 2026-01-01 10:04:11 -08:00