Prevent stale events from shards that ended naturally (not via stopMonitor). handleMessage now gates on gameFinished in addition to manuallyStopped. handleEntityUpdate properly cleans up on gameFinished by emitting room.disconnected, removing from activeShards, and calling disconnect. handleError also removes from activeShards. Probe message handler and status broadcast bail out when the shard is stopped or the game has finished. Made-with: Cursor
22 KiB
22 KiB