Session stuck in "Streaming paused for Desktop" indefinitely after abnormal UDP disconnect (Windows) — blocks reconnection even over a different network path
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
- 领域
- backend, networking
调研方向
Start by tracing Sunshine's Windows session and UDP socket handling for the paused streaming state; the issue does not name source files or tests, so locate the code that logs UDP receive errors and changes the tray state. Reproduce or inspect how an abnormal disconnect affects later connection attempts and whether the paused session is cleared or resumed. Done means a dropped session can recover or time out so new connections are accepted; add regression coverage for that behavior.
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
Is your issue described in the documentation?
- I have read the documentation
Is your issue present in the latest beta/pre-release?
I'm too lazy to test
(Reproduced on latest stable v2026.914.233613. Have not yet re-tested against the v2026.1115/v2026.1116 pre-releases since the host was deliberately left in the stuck state for diagnostics before filing this.)
Describe the Bug
After an abnormal (non-graceful) network disconnect, the session gets stuck in the "paused" state shown by the tray icon/notification (Streaming paused for Desktop) and never recovers. Every subsequent Moonlight connection attempt fails, even after switching the client to a completely different network path (see below), until Sunshine is manually restarted.
Timeline from today:
- Streaming normally over a Tailscale connection (confirmed direct P2P via
tailscale ping, not DERP-relayed) to a Windows host. - At the time, the client was connected over a slow/congested university Wi-Fi network (not the client's usual home network). The log shows a UDP receive error:
(Korean for the localized Windows socket error 10061 / WSAECONNREFUSED — i.e. an ICMP port-unreachable was received back, meaning the destination UDP port the server was sending to was no longer bound on the client side.)[2026-11-16 09:43:33.925]: Error: Couldn't receive data from udp socket: 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다 - ~54s later, a new session did start successfully:
[2026-11-16 09:44:27.712]: Info: Display device configuration is disabled. Reverting any active display device configuration. [2026-11-16 09:44:28.225]: Info: New streaming session started [active sessions: 1] [2026-11-16 09:44:29.424]: Info: Creating encoder [hevc_nvenc] [2026-11-16 09:44:29.480]: Info: NvEnc: created encoder v1301 HEVC P4 async two-pass rfi spatial-aq - At some point after that, the connection dropped again and this time it did not recover. The Windows notification area shows "Streaming paused for Desktop" with the paused-state tray icon, and it has stayed that way continuously for 11+ hours (still stuck as of filing this issue).
- While stuck, we tried reconnecting over a completely different network path (client Wi-Fi → LAN switch → host, instead of Tailscale) — same failure, no change. This rules out the network/VPN path as the cause: whatever got stuck is host-side session state, not connectivity.
sunshine.loghas logged nothing (no new session/error/NVENC lines) since the 09:44 entries above, even though we attempted multiple reconnects hours later over the different network path. So the host-side session/socket layer isn't even acknowledging new connection attempts while stuck in this paused state.- Sunshine has deliberately not been restarted yet, in case additional diagnostics are wanted.
This looks related to the general "session stuck in paused state" bug class (e.g. #4801, which was about a different trigger — unpairing the last device), but the trigger here is a plain network drop, not unpairing, and there appears to be no timeout that ever expires/clears the paused session on its own.
Expected Behavior
Either:
- The paused session should time out after some grace period if the client never reconnects, returning Sunshine to idle and accepting new connections normally, or
- A reconnect attempt (even from a different IP/network path) should be able to properly resume or replace the stuck paused session instead of silently failing.
Additional Context
- GPU encoder session count was confirmed at 0 via
nvidia-smi --query-gpu=encoder.stats.sessionCountwhile stuck, so this is not an NVENC concurrent-session-limit issue. tailscale pingto the client during the working period showed a direct P2P connection (pong from <client> via <public-ip>:<port>), not a DERP relay, so this isn't a Tailscale relay/bandwidth issue either.- Happy to gather more diagnostics (Process Explorer handles, ETW trace, etc.) on request — the host is currently still in the stuck state.
Host Operating System
Windows
Operating System Version
Windows 11 Pro 25H2, Build 26200.9974
Architecture
amd64/x86_64
Package
Windows - msi installer (recommended)
GPU Type
NVIDIA
GPU Model
GeForce RTX 4070 SUPER
GPU Driver/Mesa Version
617.42
Capture Method
Desktop Duplication API (Windows)
Log output
[2026-11-16 09:20:56.490]: Info: Requested frame rate [60/1 exactly 60 fps]
[2026-11-16 09:20:56.491]: Info: Creating encoder [hevc_nvenc]
[2026-11-16 09:20:56.546]: Info: NvEnc: created encoder v1301 HEVC P4 async two-pass rfi spatial-aq
[2026-11-16 09:43:33.925]: Error: Couldn't receive data from udp socket: 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
[2026-11-16 09:44:27.712]: Info: Display device configuration is disabled. Reverting any active display device configuration.
[2026-11-16 09:44:28.225]: Info: New streaming session started [active sessions: 1]
[2026-11-16 09:44:29.424]: Info: Requested frame rate [60/1 exactly 60 fps]
[2026-11-16 09:44:29.424]: Info: Creating encoder [hevc_nvenc]
[2026-11-16 09:44:29.480]: Info: NvEnc: created encoder v1301 HEVC P4 async two-pass rfi spatial-aq
No further session/error/NVENC log lines appear after this, despite multiple reconnect attempts hours later over a different network path.
- 主要语言
- C++
- 星标
- 43k
- 派生
- 2.4k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LizardByte/Sunshine 的其他 Issue
-
Linux keyboard backend has no mapping for VK_ABNT_C1 (ABNT2 dedicated `/ ?` key) — key is silently dropped可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
LizardByte/Sunshine#6051 · 2 条评论 ·
-
PIN pairing fails with "Missing CSRF token" - web UI never fetches/attaches the token可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
LizardByte/Sunshine#5467 · 2 条评论 ·
-
Virtual HID Driver License notifications appearing even though Enable Gamepad Input is unchecked未关闭
难度 3/5 1-2 天 新手友好度 65/100
LizardByte/Sunshine#6222 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 47/100
LizardByte/Sunshine#6208 ·
-
难度 4/5 3-5 天 新手友好度 45/100
LizardByte/Sunshine#6202 · 1 条评论 ·
查看 LizardByte/Sunshine 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 2 天内回复
-
bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 ·
维护者通常 1 天内回复
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 82/100
openscad/openscad#7360 · 2 条评论 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
connector-maintenance
难度 2/5 1-3 小时 新手友好度 72/100
gettakaro/connectors#1067 ·
维护者通常 1 天内回复