fix issue with writing getting caught up under very rare conditions

This commit is contained in:
KingKDot
2026-04-03 20:01:34 -05:00
parent e25834957f
commit 6b4f5f4677
3 changed files with 19 additions and 8 deletions
+1
View File
@@ -589,6 +589,7 @@ func runSession(ctx context.Context, cancel context.CancelFunc, conn *websocket.
last := env.LastPong()
if !last.IsZero() && time.Since(last) > grace {
log.Printf("ping: no pong for %s, forcing reconnect", time.Since(last))
conn.Close(websocket.StatusGoingAway, "pong timeout")
cancel()
return
}