rwadurian/backend
hailin 8a9a983cbd fix(android): 使用同步标志修复参与方显示4/3的竞态条件bug
问题根因:
- 之前使用异步的 sessionStatus 检查来防止 participant_joined 事件
  在 session_started 之后继续添加参与方
- 但 sessionStatus 是通过 StateFlow 异步更新的,检查时状态可能还未更新
- 导致 participant_joined 事件仍能添加额外的参与方,显示4/3而非3/3

解决方案:
- 添加同步标志 sessionStartedForSession: String?
- 在 session_started 处理器的最开始同步设置此标志
- 在 participant_joined 处理器中检查此标志,而非异步状态
- 由于回调是顺序处理的,这种方式100%可靠

修改内容:
1. 添加 sessionStartedForSession 私有成员变量
2. 在 session_started 事件处理开始时立即设置标志
3. 在 participant_joined 事件处理开始时检查标志
4. 在所有 reset 方法中重置标志:
   - resetSessionState()
   - resetJoinKeygenState()
   - resetCoSignState()
   - resetTransferState()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 09:08:13 -08:00
..
.claude refactor: simplify mpc-service to gateway mode 2025-12-06 17:16:14 -08:00
api-gateway fix(kong): remove ws/wss protocols from WebSocket route 2026-01-18 21:36:30 -08:00
infrastructure chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置 2025-12-23 18:35:09 -08:00
mpc-system fix(android): 使用同步标志修复参与方显示4/3的竞态条件bug 2026-01-27 09:08:13 -08:00
scripts fix(scripts): 修正容器名为 rwa-blockchain-service 2025-12-15 10:34:25 -08:00
services fix(contribution-service): CDC planting_orders 阶段按 order_id 排序处理 2026-01-23 03:41:14 -08:00
.env.windows fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题 2025-12-14 05:05:03 -08:00
docker-compose.windows.yml feat(service-party-app): implement co-sign multi-party signing 2025-12-30 18:36:11 -08:00