HydraIssues

hydrabody: stale session watchdog kills experience after 2 minutes during active stream
closed unclassified Project: hydrabody Reporter: 20 May 2026 20:18

Description

Bug

During an active Moonlight stream (Mercator Talks on cosmic-pretzel-98), the experience process was killed after ~2 minutes while the Moonlight client remained connected (desktop visible through Sunshine).

Root cause

tickStaleSession in stale_session_watchdog_windows.go checks for ESTABLISHED TCP connections only on ports 47984 (HTTP) and 47989 (HTTPS) — the GameStream handshake ports. Those connections close shortly after the stream is established.

The Sunshine RTSP control channel (port 48010 TCP, labeled "Sunshine RTSP" in firewall_windows.go) stays ESTABLISHED throughout the session but is not in the check. After exactly 2 minutes of no connection on 47984/47989, the watchdog calls OnStreamEnded for all active sessions, which triggers the 30-second grace period and then kills the experience via ForceStop. Sunshine continues streaming the desktop.

Fix

Add :48010 to the TCP connection check in tickStaleSession(). One-line change + comment update + testbook update.