bug: GM roster 'connected' goes stale on plain reconnect #88
Notifications
Due Date
No due date set.
Blocks
#77 M4: real-phone playtest gate (Note 10, 60 fps)
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#88
Reference in New Issue
Block a user
Part of #63
Problem
A player reconnects with an existing name (tab reload or a plain close/reopen) and the GM's roster row stays
offlinewhile the player's own connection badge says Connected. A pure reconnect never changes roster state on the GM side.Cause
rosteris sent only to the connecting connection duringresync; a plain connect/close sends no roster to anyone else. The connected flag is derived fromconns.activeCountForonly when some other operation (setname/rename/key.*) happens to broadcast a roster.Fix direction
Per DESIGN §6.x roster semantics, broadcast the roster to the GM connection(s) when a player connection becomes active and when one closes (the full list every time,
connectedrecomputed after the registry change). Keep the #33 ordering invariant on the existing setname path: ack first, then hello/resync/roster. Do not add a duplicate roster ahead of the connecting connection's own resync-and-snapshot order.Acceptance
connected:trueon connect,falseafter close, andtrueagain on reconnect with the same name.Fixed on main in
fda8362.Fix:
sendRosterToGmsbroadcasts the full roster to every GM connection when a player connection activates and after it closes. On connect the connecting connection is skipped because it already gets the same roster as the first frame of its 6.3 resync; on close the registry entry is removed first soconnectedis recomputed. The malformed-flood server-initiated close now broadcasts too. Theplayer.setnameack-before-hello/resync/roster ordering (#33) is untouched.Tests: WS test — a named player's GM row goes
connected:true,falseon close,trueon a plain reconnect with the same stored name; e2e — GM row follows a player tab reload and close. The protocol test now accounts for the extra roster on a second connection.Full gate green (
test,client-test,e2e) plusmutation.