Fix Vulcan compatibility: withhold pings until JOIN_GAME is sent - #138
Open
devamyst wants to merge 1 commit into
Open
Fix Vulcan compatibility: withhold pings until JOIN_GAME is sent#138devamyst wants to merge 1 commit into
devamyst wants to merge 1 commit into
Conversation
… is sent Vulcan expects JOIN_GAME to be the first PLAY packet it sees. Grim could send a ping/transaction packet before JOIN_GAME actually went out (e.g. in the PLAYER_ABILITIES send handler during the join sequence), which Vulcan then flagged as an out-of-order confirmation packet and kicked for. GrimPlayer now tracks whether JOIN_GAME has been written to the client and sendTransaction() withholds until that's true. Fixes Axionize#127 Note: this does not replace disable-pong-cancelling. That setting must stay false (the default) for Vulcan compatibility — enabling it stops Grim from cancelling its own transaction/pong responses, so Vulcan's own listener ends up seeing IDs it didn't send and kicks for a mismatch mid-session. Server admins running Vulcan alongside Grim should leave disable-pong-cancelling: false.
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.
Summary
JOIN_GAMEwas actually written to the client (e.g. from thePLAYER_ABILITIESsend handler during the join sequence). Vulcan treatsJOIN_GAMEas the first PLAY packet it expects, so an early ping showed up as an out-of-order confirmation and got the player kicked.GrimPlayernow tracks whetherJOIN_GAMEhas actually been sent (hasSentJoinGamePacket), set viaevent.getTasksAfterSend()inPacketPlayerRespawn's existingJOIN_GAMEhandler, andsendTransaction()withholds until that flag is true.Important:
disable-pong-cancellingmust stayfalseThis PR does not replace the
disable-pong-cancellingconfig option, and does not require enabling it. Server admins running Vulcan alongside Grim should leavedisable-pong-cancelling: false(the default).We confirmed this directly: a separate, ongoing mid-session kick (
out-of-order packet (Received X ≠ Expected Y), unrelated to join timing) was traced todisable-pong-cancellingbeing set totrueon a test server — a workaround suggested elsewhere in #127 that turned out to make things worse. With ittrue, Grim stops cancelling its own transaction/pong responses, so Vulcan's own listener sees confirmation IDs it never sent and kicks for the mismatch. Setting it back tofalse(defaultLOWEST-priority cancellation inPacketPingListener) resolved that kick. Both fixes (this PR + correct config) were needed together to fully resolve Vulcan compatibility in our testing.Test plan
./gradlew build)disable-pong-cancelling: false