mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 14:37:43 +01:00
Fix warning when using a Unix domain socket to connect to a server
This commit is contained in:
@@ -182,14 +182,16 @@ public final class ConnectionManager {
|
||||
public Bootstrap createWorker(@Nullable EventLoopGroup group, SocketAddress target) {
|
||||
Bootstrap bootstrap = new Bootstrap()
|
||||
.channelFactory(this.transportType.getClientChannelFactory(target))
|
||||
.option(ChannelOption.TCP_NODELAY, true)
|
||||
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS,
|
||||
this.server.configuration().getConnectTimeout())
|
||||
.group(group == null ? this.workerGroup : group)
|
||||
.resolver(this.resolver.asGroup());
|
||||
if (target instanceof InetSocketAddress) {
|
||||
bootstrap.option(ChannelOption.TCP_NODELAY, true);
|
||||
if (transportType == TransportType.EPOLL && server.configuration().useTcpFastOpen()) {
|
||||
bootstrap.option(EpollChannelOption.TCP_FASTOPEN_CONNECT, true);
|
||||
}
|
||||
}
|
||||
return bootstrap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user