rwadurian/backend/mpc-system/services/message-router/adapters
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
..
input/grpc fix(message-router): prevent subscription race condition on gRPC reconnect 2026-01-01 10:04:11 -08:00
output feat(mpc-system): 增强连接可靠性和消息去重机制 2025-12-29 07:37:03 -08:00