fix multiplayer snapshot disconnect race

This commit is contained in:
Josh Creek
2026-08-31 20:05:40 +01:00
parent 8d4a0640e2
commit 835233672f
4 changed files with 32 additions and 3 deletions
+2 -2
View File
@@ -31,13 +31,13 @@ The one place to look before planning. Everything here is also written up where
These two are independent and can be done in either order, but B is the cheaper of the two to arrange and would also exercise A's conditions incidentally.
### Known defects, not fixed
### Known defects
| # | What | Severity | Detail |
|---|---|---|---|
| C | **Slot reservation and takeover are keyed on display name alone.** Any peer connecting with a departed player's name inside the 30 s window claims their slot, ship and team. | Real, demonstrated. Bounded by needing a genuine disconnect to race. | §11 |
| D | **Input is still lost at the transport layer during a long server stall**, variably — 7 of 8 runs measured 0.00 % of the sequence stream missing, the eighth 23.54 %. | Low. Distinct from the rate-limiter cause, which is fixed. The seq-guard resync visibly recovers it. | Phase 5 notes |
| E | **A second `Unable to send packet on channel N` stderr race**, in `_broadcast_snapshot` rather than the fixed site in `_remove_player`. | Cosmetic, but it violates the clean-stderr convention the tests rely on. Only reproduced via the adversarial abuse role. | §11 |
| E | **A second `Unable to send packet on channel N` stderr race**, in `_broadcast_snapshot` rather than the fixed site in `_remove_player`. | **Fixed.** Server-side abuse disconnects invalidate the peer before closing it, and snapshot sends re-check that invalidation at the transport boundary. | §11 |
C is the one to plan around: it is fixed for free by task **7.4** (Steam auth tickets in `hello`), which is why it has not been given a bespoke solution. Anything that ships to strangers before Phase 7 needs it addressed first.