Commit Graph

2 Commits

Author SHA1 Message Date
Fabian @ Blax Software f04ace1eea BF clear the per-channel socket lists when tracking is reset
WebsocketService::resetAllTracking(), which the server runs at start,
forgot "ws_channel_connections" without a channel suffix, a key nothing
writes. The real lists, ws_channel_connections_<channel>, outlived a
restart or crash, and getChannelConnections() returned dead sockets until
the channel was tracked again. The ws_socket_auth_<socket> entries stayed
behind the same way.

resetAllTracking() now reads ws_active_channels and ws_socket_authed_users
before it forgets them and deletes the per-channel lists and per-socket
auth entries they name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:29:04 +01:00
Fabian @ Blax Software 093bbe3a44 A tests, documentation for helpers and lifecycle
- Introduced `helpers-and-testing.md` to document global helpers and WebsocketService class usage.
- Created `HandlerLifecycleTest.php` to test the full WebSocket handler lifecycle, including connection management, channel subscriptions, and message routing.
- Added `WebsocketServiceTest.php` to validate state tracking methods in WebsocketService, covering user authentication, channel tracking, and broadcast functionality.
2026-04-02 12:44:16 +02:00