fix: ready once, then hands off — a server that never readies is invisible#61
Merged
Conversation
…sible Matchmaker-managed servers never entered the pool. Agones only moves a GameServer out of Scheduled when it calls ready(), and #60 removed the call entirely — so the fleet sat there looking perfectly healthy while, to an allocator, it did not exist. Every allocation came back UnAllocated and no match could ever be placed. Verified live: the duel fleet's GameServer stayed in Starting indefinitely. Keeping our hands off the state was too broad a reading. What must not happen is re-readying a server that is ALREADY allocated — its players are seconds away, and handing it back lets a second match land on it. That is the bug #60 fixed, and it stays fixed: no readiness loop, no player listeners, no ready() on empty. So the server readies exactly once, to enter the pool, and never touches its state again. Ending the match remains the gamemode's job. The KDoc that said "no ready()" is corrected too — it is what drove the mistake.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Matchmaker-managed servers never entered the pool.
Agones only moves a GameServer out of
Scheduledwhen it callsready(). #60 removed that call entirely — so the fleet sat there looking perfectly healthy while, to an allocator, it did not exist. Every allocation came backUnAllocated, and no match could ever be placed.Verified live in
vcluster-dahendriik: theduelfleet's GameServer stayed inStartingindefinitely,READY 0.What #60 got right, and what it over-read
What must not happen is re-readying a server that is already allocated — its players are seconds away, and handing it back lets a second match land on it. That was the real bug, and it stays fixed: no readiness loop, no player listeners, no
ready()on empty.But "keep your hands off the state" was too broad a reading. The server has to enter the pool once, or it is not a server at all as far as the matchmaker is concerned.
So: ready exactly once, then never touch the state again. Ending the match remains the gamemode's job (
SDK.Shutdown).Both platforms (paper + minestom). The
GameServerOwnershipKDoc — which said "noready()" and is what drove the mistake — is corrected in the same commit.