Avoid warning Unknown channel option 'SO_KEEPALIVE' on Mac

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
This commit is contained in:
Max Lambrecht 2020-05-18 13:58:33 -03:00
parent a58aa9925b
commit a203cf450f
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ public class GrpcManagedChannelFactory {
// nThreads = 0 -> use Netty default // nThreads = 0 -> use Netty default
KQueueEventLoopGroup kQueueEventLoopGroup = new KQueueEventLoopGroup(0, executorService); KQueueEventLoopGroup kQueueEventLoopGroup = new KQueueEventLoopGroup(0, executorService);
channelBuilder.eventLoopGroup(kQueueEventLoopGroup) channelBuilder.eventLoopGroup(kQueueEventLoopGroup)
// avoid warning Unknown channel option 'SO_KEEPALIVE'
.withOption(ChannelOption.SO_KEEPALIVE, null)
.channelType(KQueueDomainSocketChannel.class); .channelType(KQueueDomainSocketChannel.class);
return kQueueEventLoopGroup; return kQueueEventLoopGroup;
} }