22 ADRs: server-authoritative sight and single egress, per-recipient views/diffs, uniform nack, opaque ids, 32 px tile unit, wall switches/presets, see-over, thick walls, open-door gap, typed wall columns, proto 2, build order, zoom clamp, accepted status leak, player marker, chunked explored, slow-client policy, session/key split, closing message, character records, global lock, synchronous choice. Each links its tickets and its spec section.
29 lines
1.3 KiB
Markdown
29 lines
1.3 KiB
Markdown
# Close reasons ride a final `closing` message at the mummy pin
|
|
|
|
Mummy 0.4.8 exposes only `close(ws)`, which sends an empty close frame; a browser reports 1005 and
|
|
no application close code can be sent. The server is neither forked nor patched. Instead every
|
|
server-initiated close is two frames: a final `closing {reason, code}` application message carrying
|
|
the static reason and the numeric code from the connection-outcome table, then the close frame. The
|
|
client reads the reason from the last message it received.
|
|
|
|
## Status
|
|
accepted
|
|
|
|
## Alternatives
|
|
- Patch/fork mummy to send a close code: fallback only, rejected as the primary path.
|
|
- Infer the reason from 1005 alone: rejected, a client cannot tell eviction from revocation from a
|
|
protocol mismatch.
|
|
- Put the reason in the close frame's reason string: not possible at the pin.
|
|
|
|
## Consequences
|
|
A server-initiated close is always two steps, and `closing` is the last application frame that
|
|
connection sees. `closing` is a catalogue message, so the server-message count includes it. Tests
|
|
assert "last message is `closing` with this reason and code, then 1005". Refusals before the upgrade
|
|
(403/401/400/503) remain plain HTTP statuses. The `n` counter is stamped on `closing` too.
|
|
|
|
## Tickets
|
|
#18; #17 (slice 2 revoke/evict paths).
|
|
|
|
## Spec
|
|
Current §3.2, §6.1 (`closing`), §6.5.
|