moq-native: enable WebSocket keep-alive on the client path#1580
Conversation
Wire qmux::KeepAlive::default() (5s ping / 30s deadline) into the client connect builder, matching QUIC's liveness behavior. A half-dead WebSocket now hits the 30s deadline, closes, and session.closed() resolves so the existing reconnect loop re-establishes automatically — no process restart required. The server accept path and qmux already supported this; it just was not wired up on the client side. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR adds an explicit keep-alive configuration to the WebSocket fallback connection in qmux::Client. The change applies 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Wire
qmux::KeepAlive::default()(5s ping / 30s deadline) into the WebSocket client connect builder inrs/moq-native/src/websocket.rs:Why
Previously the client WebSocket had no keep-alive, so a half-dead connection (network drop, NAT timeout, dead peer) would hang indefinitely —
session.closed()never resolved, the reconnect loop never fired, and recovery required a process restart.With keep-alive wired up, a half-dead WebSocket misses pings, hits the 30s deadline, the transport closes,
session.closed()resolves, and the existing reconnect machinery re-establishes the session automatically. This brings the WebSocket client to parity with the QUIC path's liveness behavior.The machinery and sensible defaults (
KeepAlive::default()= 5s/30s, perqmux0.0.7) already existed and the server accept path already used them — they just weren't wired up on the client side.Testing
cargo check -p moq-nativepasses.🤖 Generated with Claude Code