Files
memoryweave/go/internal
xiaowei cd49a2801a fix(ws): add per-conn mutex to prevent concurrent WriteJSON panic
Root cause: Broadcast() and Push() launched multiple goroutines
writing to the same websocket.Conn simultaneously. Gorilla websocket
does not support concurrent WriteMessage/WriteJSON.

Fix: add connMu sync.Map (*websocket.Conn → *sync.Mutex) to WSManager.
Each WriteJSON now goes through writeWithLock() which acquires the
per-conn mutex. Unregister() also acquires the lock before Close()
to prevent write/close races.

No functional changes to API surface.
2026-05-30 17:15:19 +08:00
..
2026-05-30 05:23:15 +08:00
2026-05-30 12:08:16 +08:00