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

chore: add a channel initializer that only sets supported options #1130

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

derklaro
Copy link
Member

Motivation

Netty prints out a warning when trying to set channel options that are not supported by a transport (only for options added by the (server-) bootstrap). This is no big deal as the warning can be ignored, but there are some users which are reporting it as an issue.

Modification

Add a new channel initializer that holds the options that should be added to a channel and only sets them if they are supported by the channel that gets initialized. This is the best way to solve the issue, as there is no other way to check if an option is supported. Although some options are bound to epoll or kqueue, it might get over complicated when checking based on that, especially considering the addition of the io_uring transport that is coming into netty main with the next release.

Result

No more warnings that there was a try to set channel options that are not supported by the channel.

@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release in: driver An issue/pull request releated to the driver module code t: improvement The pull request improves existing code labels Feb 19, 2023
@derklaro derklaro added this to the 4.0.0-RC8 milestone Feb 19, 2023
@derklaro derklaro self-assigned this Feb 19, 2023
@0utplay 0utplay merged commit f0772bf into nightly Feb 20, 2023
@0utplay 0utplay deleted the channel-option-warning branch February 20, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: driver An issue/pull request releated to the driver module code t: improvement The pull request improves existing code v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants