mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #509] resume() sends a second HTTP response (400) after a successful resume #311
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jdonaldson on GitHub (Sep 21, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/509
Summary
endpoints::https::resume()writes two complete HTTP responses onto the same connection when a resume succeeds: the200+ resume XML, immediately followed by a400fromserver_error(). The trailingserver_error()call sits at function scope instead of inside theelse.Code
src/moonlight-server/rest/endpoints.hpp#L442-L474(stable @2273b2e):send_xml()callsresponse->write(...)and setsclose_connection_after_response = true(rest/helpers.hpp#L42-L50), andserver_error()is itself asend_xml()withclient_error_bad_request. So a successful resume emits200 <resume xml>followed by400 <error xml>on the same connection.Three things suggest this is a leftover rather than intent:
launch()andcancel()both end with a singlesend_xml()and no trailingserver_error().server_error<SimpleWeb::HTTPS>(response)calls in this file (L349, L356, L419) are all inside conditionals; this is the only one at function scope.git blameputs the line incb0e168e(2025-04-04) — the same commit that added the success-pathsend_xml()two lines above.Impact
I want to be precise about what I have and have not checked:
Independent of client tolerance, it makes a successful resume indistinguishable from a failed one at the protocol level, which is awkward precisely when debugging the resume path.
Suggested fix
Move the
server_error()call inside theelse. PR to follow.Context
Found while investigating re-entry into an already-running session (#501, #504). I am not claiming this causes the CUDA-context crashes in those issues — it is a separate defect noticed along the way.
Environment
Read against
stable@2273b2e. Running Wolf built from that commit on Debian 13, RTX 4090, NVIDIA driver 550.163.01 (proprietary).Analysis assisted by Claude Code; the code references and
git blameabove were checked against the repository before filing.