Skip to content

Commit

Permalink
Merge pull request #25 from spiffe/dev
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
maxlambrecht authored May 18, 2020
2 parents 8c3866e + c7c7cf3 commit 25cb640
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'spiffe'
version '0.5.0'
version '0.5.1'

buildscript {
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.grpc.*;
import io.grpc.netty.NegotiationType;
import io.grpc.netty.NettyChannelBuilder;
import io.netty.channel.ChannelOption;
import io.netty.channel.epoll.EpollDomainSocketChannel;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.kqueue.KQueueDomainSocketChannel;
Expand Down Expand Up @@ -107,10 +108,13 @@ private static void configureNativeSocketChannel(NettyChannelBuilder channelBuil
checkNotNull(channelBuilder, "Channel builder is Null");
if (SystemUtils.IS_OS_LINUX) {
channelBuilder.eventLoopGroup(new EpollEventLoopGroup())
.channelType(EpollDomainSocketChannel.class);
// avoid Unknown channel option 'SO_KEEPALIVE'
.withOption(ChannelOption.SO_KEEPALIVE, null)
.channelType(EpollDomainSocketChannel.class);
} else if (SystemUtils.IS_OS_MAC) {
channelBuilder.eventLoopGroup(new KQueueEventLoopGroup())
.channelType(KQueueDomainSocketChannel.class);
.withOption(ChannelOption.SO_KEEPALIVE, null)
.channelType(KQueueDomainSocketChannel.class);
} else {
channelBuilder.eventLoopGroup(new NioEventLoopGroup());
}
Expand Down

0 comments on commit 25cb640

Please sign in to comment.