Repository navigation
Remove injected handlers when disabling on Spigot - #687
Open
HyacinthHaru wants to merge 1 commit into
Open
HyacinthHaru wants to merge 1 commit into
HyacinthHaru wants to merge 1 commit into
Conversation
|
If AI was used at any stage in creating this PR, please read the AI Policy. |
Contributor
Author
I initially discovered this issue after upgrading my server to Minecraft 26.3. After asking Claude to analyze it, I confirmed the issue and had it fix the problem with a minimal diff. I apologize for not noticing AI_POLICY. However, both the discovery of the issue and the post-fix testing were carried out on my own local test server. Thank you for pointing this out. I updated the PR description to include a disclosure regarding the use of AI tools. |
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.
SpigotInjector#removeInjection()returned right after restoring the original channel list, so the code after it never ran, and thefloodgate-inithandler thatinjectClient()adds to the server channel was never removed at all.SpigotDataAddon#onRemoveInject()was also a no-op, sofloodgate_data_handlerstayed on any connection that was still in the handshake/login phase.This mostly shows up after a plugin-manager reload: the new instance tries to inject again, netty rejects it with
Duplicate handler name: floodgate-init, the exception is swallowed by the loop ininject(), and the old handler from the closed class loader keeps running while the new Floodgate believes it is injected. The same thing happens when enabling fails afterinject()already ran, which is what caused thezip file closederrors reported alongside GeyserMC/Geyser#6716 on Paper 26.3.removeInjection()now falls through toremoveAddonsCall()andinjected = falseas intended, removesfloodgate-initfrom every listening channel, andSpigotDataAddonremoves its own handler like the other addons already do. No new state is introduced; the channel list thatinject()wraps is walked in reverse.Tested on Paper 26.2/26.3 by reloading Floodgate and re-joining with a Java and a Bedrock client.
I used Claude Code to help identify and fix the issue, but I performed the final testing.