Repository navigation
[ID-1669] Keep quiet EVM WebSocket connections responsive - #13
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe WebSocket server now sends client Ping control frames every 20 seconds with a 5-second write deadline. It stops the ping goroutine when the handler exits. Tests cover quiet proxy connections, concurrent RPC and subscription traffic, and session termination. ChangesWebSocket client heartbeat
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ServeHTTP
participant pingClient
participant TCPIdleProxy
participant WebSocketClient
ServeHTTP->>pingClient: Start heartbeat goroutine
pingClient->>TCPIdleProxy: Send Ping frame
TCPIdleProxy->>WebSocketClient: Forward Ping frame
Merge Risk: ⚪ Minimal · up to No merge-blocking issue is identified. Complete the planned public-connection test before DNS cutover. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Quiet native EVM WebSocket clients without TCP keepalive stopped responding after six minutes through OVH, while the same source Caddy and private Service tests passed. Send an empty downstream Ping every 20 seconds so quiet connections continue carrying traffic through the public proxy path.
The EVM listener uses Gorilla's concurrent-safe control writer with a five-second budget, closes the client on write failure, and stops and joins the heartbeat before unregistering the handler. No Pong deadline is added; subscription routing and other listeners are unchanged.
Validation:
go test -mod=readonly -race -count=1 -timeout=10m ./....go vet ./...andgo build -mod=readonly -o /tmp/stitch-id-1669 ./cmd/stitch.The six-minute public test with TCP keepalive disabled must pass after deployment before DNS cutover.
ID-1669