Repository navigation
Conversation
The control stream peer never received enet_peer_timeout(), so it kept ENet's defaults (5 s minimum). On links with short outages the host disconnected the client after ~5 s regardless of ping_timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011uyno7VQowGYGzwwcHAfBT
|
|
The 7.2-second recovery is encouraging. Before merging, could you compare patched and unpatched builds from the same base with identical controlled interruptions at both the default The pinned ENet code treats 5 seconds as a retry-gated minimum, not a fixed outage cutoff. At Sunshine’s default, this patch sets both ENet bounds to 10 seconds (previously 5-second minimum and 30-second maximum) and changes the cap used in retransmission timing. Moonlight’s separate peer timeout also means the host’s 30-second setting does not guarantee 30 seconds of stream survival. This is a source check, not an independent live-stream test. |



Description
The control stream peer never gets
enet_peer_timeout(), so it keeps ENet's defaults (ENET_PEER_TIMEOUT_MINIMUM= 5000 ms). On links with short outages (e.g. a client on a cellular hotspot) the host disconnects the client after ~5 s, even whenping_timeoutis raised. The client then logsControl stream received unexpected disconnect event/Connection terminated: -1.This sets the control peer's timeout to
ping_timeoutwhen the client connects, so the configured value actually governs how long a session survives a network outage.Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
Manual validation on a Linux host (Fedora 45, NVIDIA, KMS capture + NVENC, build of v2026.914.233613 with this patch) and Moonlight-qt 6.2.0 on Windows over Tailscale and an LTE hotspot,
ping_timeout = 30000:CLIENT DISCONNECTEDabout 5 s after the outage started.No automated test was added: the behaviour depends on ENet retransmission timing over a real socket, which the existing unit tests do not exercise.
Type of Change
Checklist
AI Usage
See our AI usage policy.
An AI assistant (Claude Code) traced the disconnects to the missing peer timeout, wrote the patch, built it and ran the outage test above.
🤖 Generated with Claude Code