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

Improve eventloop consistency and isClosing code #3779

Closed

Conversation

Outfluencer
Copy link
Collaborator

All channel calls need to be in a eventloop context. if they are not, netty will put them in context. (this costs performance)
After nearly all event calls there is a call with the netty channel. So we should reschedule to the channel eventloop if we are not in the channels eventloop context.

I added a small wrapper to solve this problem where i also added the channel closing checks so we don't have to add them anywhere we have an event.

@Outfluencer Outfluencer requested a review from md-5 February 7, 2025 09:28
@Janmm14
Copy link
Contributor

Janmm14 commented Feb 7, 2025

I don't see why we should remove the early closed channel check and ask plugins via events about an incoming packet on a closed connection.

@Outfluencer
Copy link
Collaborator Author

Outfluencer commented Feb 7, 2025

I added a small wrapper to solve this problem where i also added the channel closing checks so we don't have to add them anywhere we have an event.

I am not sure what you mean i just moved it into the wrapper

@Outfluencer
Copy link
Collaborator Author

The close checks i removed have been inside the callback to check if the user disconnected during the event, thats what i moved into the wrapper, same behaviour less duplicate code

@Janmm14
Copy link
Contributor

Janmm14 commented Feb 7, 2025

The close checks i removed have been inside the callback to check if the user disconnected during the event, thats what i moved into the wrapper, same behaviour less duplicate code

oh i didnt notice they were insidethe wrapper, was looking at your changes on my phone that time.

@md-5
Copy link
Member

md-5 commented Feb 8, 2025

Thanks

@md-5 md-5 closed this Feb 8, 2025
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.

3 participants