mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[PR #480] [MERGED] fix(lobby): Controller lost when joining a running lobby. #491
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#491
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?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/wolf/pull/480
Author: @dustuu
Created: 8/17/2026
Status: ✅ Merged
Merged: 9/7/2026
Merged by: @ABeltramo
Base:
stable← Head:dustuu/lobby-fix📝 Commits (2)
47bf32afix: plug joypads into lobby before registering the session as connected028a6b9build: remove stale liblibgstwaylanddisplay COPY📊 Changes
2 files changed (+16 additions, -17 deletions)
View changed files
📝
docker/wolf.Dockerfile(+0 -1)📝
src/moonlight-server/sessions/lobbies.cpp(+16 -16)📄 Description
Joining a lobby can leave the game container without a working controller. The pad still works in the Wolf UI session and first launches are always fine, but a few quit/rejoin cycles will reliably trigger it. The cause is that the join handler adds the session to connected_sessions before migrating its joypads, so the UnplugDeviceEvent meant for the old session's runner also gets relayed to the lobby runner, where it races the queued plug and can remove the device right after it was added.
I reordered the join to do what leave_lobby already does (migrate devices first, then register the session) and pointed the queued plug at the lobby id directly, which makes the old global plug event redundant.
The second commit fixes the runner stage COPY of liblibgstwaylanddisplay. cargo-c installs it into the libdir, not /usr/local/lib, so the build fails under podman/buildah. I needed that fix to build and test this locally.
Tested with 10 quit/rejoin cycles plus a force-close on the patched build, no failures. Stock loses the controller within a couple of joins (logs below).
Logs:
BEFORE (wolf:stable @
7f416ec), same repro, two consecutive joins:join 1, controller survives (the relayed unplug happens to land before the queued plug):
join 2, controller lost (queued plug drains first, the relay kills it 9ms later):
AFTER (patched), every join looks like this:
11 joins total (10 quit/rejoin plus 1 extra where I force-closed the client). The "[LOBBY] Unplug device" relay line never shows up at join and the controller worked in game every time.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.