Dead RCON is not fatal even when the adapter spawned the server, so a failed launch looks healthy #2
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mobrule/mobrule-pack-doom#2
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?
Split out of #1, which parked pending a retest. This is the part of that issue's diagnosis that a code read confirmed, so it can proceed independently of the retest.
Agent Brief
Category: bug
Summary: A dead RCON connection is not fatal even when the adapter spawned the server itself, so a launch that failed produces a healthy-looking adapter.
Current behavior:
The adapter connects to RCON eagerly at startup. The comment on that code says this exists so a wrong password "fails loudly at startup instead of on the first redeem" — but the failure path does not do that. After the retry deadline expires (about 8 seconds) it prints one line to stderr and breaks out of the loop, then carries on: it connects to MPP, sends
hello, receives its ack, and registers as a healthy adapter. Completely dead RCON is a stderr line nobody reads.Separately, the spawned game process is fire-and-forget. Its handle is retained only so it can be terminated at exit, and its exit status is never inspected, so a binary that dies immediately after spawn goes unnoticed.
Together these mean a launch that achieved nothing still presents as a working session.
Desired behavior:
poll()-style liveness check) before the session is treated as healthy; a binary that died immediately is reported as such, again naming the path.Key interfaces:
main(): the eager-connect result must gate MPP registration when a spawn occurred, instead of being advisory in all cases.Acceptance criteria:
Out of scope:
DOOM_RCON_PASSWORDbehavior, which disables that incidental check.mobrule#176and explicitly does not catch a real-but-wrong executable.Landing this change
This repo's git history is the tutorial. The RCON client and Launcher hosting are introduced in stage 2, which is the code at fault here, so the fix belongs in that stage rather than as a commit on top. That means the tutorial prose and the README both need updating in the same change — the README currently documents the no-path case as "assume a server is already up", which stays true but now sits beside a fatal path.
Landing in stage 2 requires rewriting staged history and force-pushing, which invalidates every existing clone. Prepare the change and stop before pushing; the operator authorises the force-push.