Skip to content

Avoid netty warning by setting unknown channel option to null#24

Merged
maxlambrecht merged 3 commits intospiffe:devfrom
maxlambrecht:dev
May 18, 2020
Merged

Avoid netty warning by setting unknown channel option to null#24
maxlambrecht merged 3 commits intospiffe:devfrom
maxlambrecht:dev

Conversation

@maxlambrecht
Copy link
Copy Markdown
Member

@maxlambrecht maxlambrecht commented May 18, 2020

Keep-alive option is not set for Unix Domain Socket connections. Setting this option causes warnings in the log and the option has no effect on the channel.

Signed-off-by: Max Lambrecht maxlambrecht@gmail.com

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
…th linux and mac.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
.channelType(EpollDomainSocketChannel.class);
// avoid Unknown channel option 'SO_KEEPALIVE'
.withOption(ChannelOption.SO_KEEPALIVE, null)
.channelType(EpollDomainSocketChannel.class);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I patched the diff to my package (it might be a bit older version of the repo though), and i am getting this compile error in IDE:

Required type:
io.grpc.netty.shaded.io.netty.channel.ChannelOption
<T>
Provided:
io.netty.channel.ChannelOption
<Boolean>
reason: no instance(s) of type variable(s) T exist so that ChannelOption<Boolean> conforms to ChannelOption<T>

@maxlambrecht Any idea why?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you get if you run ./gradlew clean build ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this worked! lgtm

.channelType(EpollDomainSocketChannel.class);
// avoid Unknown channel option 'SO_KEEPALIVE'
.withOption(ChannelOption.SO_KEEPALIVE, null)
.channelType(EpollDomainSocketChannel.class);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this worked! lgtm

@maxlambrecht maxlambrecht merged commit c7c7cf3 into spiffe:dev May 18, 2020
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