fix: ping parse failure

This commit is contained in:
talksik
2026-04-09 11:19:55 -07:00
parent 3e24172c38
commit 7890304639
+5
View File
@@ -44,6 +44,11 @@ func (c *Conn) ReadPump(ctx context.Context, hub *Hub) {
return
}
// Ignore keep-alive pings
if string(data) == "ping" {
continue
}
var msg ClientMessage
if err := json.Unmarshal(data, &msg); err != nil {
c.sendError("invalid message format")