Skip to content

provider.go: Allow pausing admission - #1

Merged
TwistedAsylumMC merged 1 commit into
df-mc:mainfrom
EinBexiii:feature/pause
Oct 3, 2026
Merged

TwistedAsylumMC merged 1 commit into
df-mc:mainfrom
EinBexiii:feature/pause

Conversation

@EinBexiii

Copy link
Copy Markdown
Contributor

acceptingPlayers currently only goes false on Close(), which also closes every established connection. That makes it impossible to drain a host during a rolling update, where you want to stop new joins but keep current players connected.

Pause() reports acceptingPlayers: false and refuses new stateless, assisted and diagnostic admissions. Established connections and admissions already in progress are not affected. Resume() reverts that. Close and Deregister now stop admission through the same gate, so Resume can't reopen it during shutdown.

The provider sees the change with the next heartbeat, so the minimum update interval still applies. This follows the spec: "Report acceptingPlayers: false to pause admission ... Keep reporting actual remaining players."

Tested in TestPause, TestPauseDiagnostics and TestAssistedJoin.

@TwistedAsylumMC
TwistedAsylumMC merged commit 066380b into df-mc:main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants