From 6ff2cb77f8f5ec39fee0563f04c85365c1c74043 Mon Sep 17 00:00:00 2001 From: talksik Date: Sun, 12 Apr 2026 09:18:57 -0700 Subject: [PATCH] avoid closing connection on pong error --- go/internal/pusher/conn.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/go/internal/pusher/conn.go b/go/internal/pusher/conn.go index 89d46c7..3cdf2c0 100644 --- a/go/internal/pusher/conn.go +++ b/go/internal/pusher/conn.go @@ -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 }