Pulse/internal/websocket
rcourtman d3116defe3 fix: Prevent panic from send on closed websocket channel
Add atomic `closed` flag to Client struct and `safeSend()` helper method
to prevent race condition when sending to client channels. The race
occurred when a client disconnected while a goroutine was trying to send
initial state - the channel could be closed between the registration
check and the actual send.

All sends to client.send now go through safeSend() which checks the
closed flag first. The flag is set atomically before closing the channel
in all code paths (unregister, dispatchToClients, broadcast, shutdown).

Related to #1048
2026-01-06 17:41:25 +00:00
..
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
hub.go fix: Prevent panic from send on closed websocket channel 2026-01-06 17:41:25 +00:00
hub_concurrency_test.go refactor: use strconv.Itoa instead of string(rune()) in test 2025-10-20 15:12:14 +00:00
hub_test.go Add unit tests for websocket Hub.checkOrigin function 2025-12-01 09:33:40 +00:00