mirror of
https://github.com/games-on-whales/wolf-ui.git
synced 2026-10-15 13:02:04 +00:00
[GH-ISSUE #17] Lobbies are always created with stop_when_everyone_leaves=false, so app containers are never reaped #11
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf-ui#11
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 @davidrusho on GitHub (Sep 9, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf-ui/issues/17
Every lobby Wolf-UI creates is hardcoded to
stop_when_everyone_leaves = false, in both the solo and the co-op path:src/Scenes/Main/Body/Apps/App.cs:360(OnStartPressed→StopWhenEveryoneLeaves = false)src/Scenes/Main/Body/Apps/App.cs:439(OnCoopPressed→ same)Wolf only tears a lobby's runner down when
leave_lobby()sees that flag true and the lobby empty (sessions/lobbies.cpp:61). With it false, noStopLobbyEventis fired, the docker runner stays parked in itsdo..whileon container status, and the cleanup block guarded byWOLF_STOP_CONTAINER_ON_EXIT(runners/docker.cpp:294) is never reached.I understand the intent — the Stop button in the app menu exists precisely so a session can outlive a disconnect, and #6 is someone wanting exactly that while a game downloads. The problem is that nothing bounds it. Each launch mints a fresh lobby UUID, so the containers never collide and never self-clean the way the Wolf-UI container does (it keys on a fixed per-client folder id and logs
Container already present, removing first). On my box, with an RTX 3090 shared between this and other workloads, that means every streaming session I forget to Stop leaves a container holding ~200 MiB of VRAM and pinning the card in P2 at ~110 W indefinitely — measured 24 W once the stale lobbies are stopped.The gap that makes it easy to hit: disconnecting from Moonlight sends ENet
TERMINATION/DISCONNECT, which firesPauseStreamEventonly (control/control.cpp:179,207) — so closing the client looks to the user exactly like ending the session, but reaps nothing. The docs also point the other way:WOLF_STOP_CONTAINER_ON_EXITis documented as governing "force stop and removal of containers when the connection is closed", which is what I assumed applied here. The Lobbies page in the dev docs is currently aWIP…stub, so there is nowhere to find the real rule.Two things that would help, either one on its own:
Lobbymodel already carries the field, so this is exposing it in the app's config rather than new mechanism. "Keep running after I disconnect" is genuinely wanted for a downloading game and genuinely unwanted for a game I just finished.For now I poll
GET /api/v1/lobbieson a timer andPOST /api/v1/lobbies/stopfor any lobby whoseconnected_sessionshas been empty for 30 minutes, which works well. Happy to open a PR for either option if you'd like one and can say which shape you'd prefer.Versions: wolf
stable@2273b2e6, wolf-uimain.