fix: unreliable websocket functionality #144

Merged
talksik merged 6 commits from unreliable-websocket-infra into master 2026-04-12 17:00:12 +00:00
Showing only changes of commit 6ff2cb77f8 - Show all commits
+2 -3
View File
@@ -41,15 +41,14 @@ func (c *Conn) ReadPump(ctx context.Context, hub *Hub) {
slog.Info("websocket context cancelled", "connId", c.id, "humanId", c.humanID, "error", ctx.Err())
return
}
slog.Info("websocket read error", "connId", c.id, "humanId", c.humanID, "error", err)
slog.Warn("websocket read error", "connId", c.id, "humanId", c.humanID, "error", err)
return
}
// Respond to keep-alive pings
if string(data) == "ping" {
if err := c.ws.Write(ctx, websocket.MessageText, []byte("pong")); err != nil {
slog.Debug("websocket pong write error", "connId", c.id, "error", err)
return
slog.Warn("websocket pong write error", "connId", c.id, "error", err)
}
continue
}