Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if channel is open before injecting #547

Merged
merged 2 commits into from
Sep 29, 2024
Merged

Conversation

linsaftw
Copy link
Contributor

Some forks like FlameCord have integrated anti-bot features to block connections early.

By default, Floodgate runs anyways, which not only makes bot attacks affect the server when Floodgate is instaled, but also generate an exception.

This fixes the issue.

Some forks like FlameCord have integrated anti-bot features to block connections early. 

By default, Floodgate runs anyways, which not only makes bot attacks affect the server when Floodgate is instaled, but also generate an exception. 

This fixes the issue.
@Tim203
Copy link
Member

Tim203 commented Sep 29, 2024

It is interesting to me that those features are called early enough that the channel initializer has not yet run, but late enough that it still tries to invoke the channel initializer.
However, this specific request seems reasonable enough.
I'll add a comment to the code saying that it's needed for some Bungee forks, because generally speaking it is not needed to check if a channel is closed as early as for a SeverBootstrap#childHandler

@Tim203 Tim203 merged commit 0360721 into GeyserMC:master Sep 29, 2024
2 checks passed
@linsaftw
Copy link
Contributor Author

linsaftw commented Oct 2, 2024

It is interesting to me that those features are called early enough that the channel initializer has not yet run, but late enough that it still tries to invoke the channel initializer. However, this specific request seems reasonable enough. I'll add a comment to the code saying that it's needed for some Bungee forks, because generally speaking it is not needed to check if a channel is closed as early as for a SeverBootstrap#childHandler

Yes they are run on the pipeline entry initChannel() from PipelineUtils, which cannot cancel next pipeline entries as the Floodgate one.

LittleShyStar02 added a commit to LittleShyStar02/Floodgate that referenced this pull request Oct 31, 2024
LittleShyStar02 added a commit to LittleShyStar02/Floodgate that referenced this pull request Oct 31, 2024
Tim203 added a commit that referenced this pull request Oct 31, 2024
* Moved check of channel open of #547. In previous point was always true and it did not solve problem.

* Moved check of channel open of #547. In previous point was always true and it did not solve problem.

* Make the comment more compact

---------

Co-authored-by: Tim203 <mctim203@gmail.com>
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