Session stuck in "Streaming paused for Desktop" indefinitely after abnormal UDP disconnect (Windows) — blocks reconnection even over a different network path

Đang mở
#6,117 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend, networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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:

  1. Streaming normally over a Tailscale connection (confirmed direct P2P via tailscale ping, not DERP-relayed) to a Windows host.
  2. 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:
    [2026-11-16 09:43:33.925]: Error: Couldn't receive data from udp socket: 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다
    
    (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.)
  3. ~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
    
  4. 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).
  5. 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.
  6. sunshine.log has 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.
  7. 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.sessionCount while stuck, so this is not an NVENC concurrent-session-limit issue.
  • tailscale ping to 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.

Ngôn ngữ chính
C++
Star
43k
Fork
2.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LizardByte/Sunshine

Tất cả issue của LizardByte/Sunshine

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.