3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Silence TCP_FASTOPEN warnings when not using epoll and fast open enabled

Dieser Commit ist enthalten in:
Andrew Steinborn 2019-08-06 06:43:27 -04:00
Ursprung 9f3d1a2390
Commit e3c75a7fcc

Datei anzeigen

@ -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;