Fix 1.16.5 and 1.17.1 builds

This commit is contained in:
s809
2024-01-05 22:37:27 +05:00
parent dbc1ad4cb7
commit 962f523af9
2 changed files with 2 additions and 2 deletions
@@ -69,7 +69,7 @@ public class NetworkClient extends NetworkEventSource implements IConnection, Au
/** Indicates whether the connection is established and first message is sent. */
public boolean isReady() { return ready; }
private final EventLoopGroup workerGroup = new NioEventLoopGroup(new DefaultThreadFactory("DH-Network - Client Thread"));
private final EventLoopGroup workerGroup = new NioEventLoopGroup(0, new DefaultThreadFactory("DH-Network - Client Thread"));
private final Bootstrap clientBootstrap = new Bootstrap()
.group(this.workerGroup)
.channel(NioSocketChannel.class)
@@ -47,7 +47,7 @@ public class NetworkServer extends NetworkEventSource implements AutoCloseable
private final int port;
private final EventLoopGroup bossGroup = new NioEventLoopGroup(1, new DefaultThreadFactory("DH-Network - Server Boss Thread"));
private final EventLoopGroup workerGroup = new NioEventLoopGroup(new DefaultThreadFactory("DH-Network - Server Worker Thread"));
private final EventLoopGroup workerGroup = new NioEventLoopGroup(0, new DefaultThreadFactory("DH-Network - Server Worker Thread"));
private final AtomicBoolean isClosed = new AtomicBoolean();
private final ConcurrentMap<ChannelHandlerContext, IConnection> connections = new MapMaker().weakKeys().weakValues().makeMap();