From e3c75a7fcc79e84f115ac94df100f123075b56de Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 6 Aug 2019 06:43:27 -0400 Subject: [PATCH] Silence TCP_FASTOPEN warnings when not using epoll and fast open enabled --- .../com/velocitypowered/proxy/network/ConnectionManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java index 208ce766e..6bea37b6e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java @@ -104,7 +104,7 @@ public final class ConnectionManager { .childOption(ChannelOption.IP_TOS, 0x18) .localAddress(address); - if (server.getConfiguration().useTcpFastOpen()) { + if (transportType == TransportType.EPOLL && server.getConfiguration().useTcpFastOpen()) { bootstrap.option(EpollChannelOption.TCP_FASTOPEN, 3); } @@ -164,7 +164,7 @@ public final class ConnectionManager { this.server.getConfiguration().getConnectTimeout()) .group(group == null ? this.workerGroup : group) .resolver(this.resolverGroup); - if (server.getConfiguration().useTcpFastOpen()) { + if (transportType == TransportType.EPOLL && server.getConfiguration().useTcpFastOpen()) { bootstrap.option(EpollChannelOption.TCP_FASTOPEN_CONNECT, true); } return bootstrap;