mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-01-30 14:59:39 +08:00
Add CONNECT_TIMEOUT_MILLIS to fix timeout errors.
This commit is contained in:
parent
d028c281c9
commit
14590ca3ea
@ -56,6 +56,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
CompletableFuture<ConnectionRequestBuilder.Result> result = new CompletableFuture<>();
|
||||
server.initializeGenericBootstrap()
|
||||
.option(ChannelOption.TCP_NODELAY, true)
|
||||
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, SERVER_READ_TIMEOUT_SECONDS * 1000)
|
||||
.handler(new ChannelInitializer<Channel>() {
|
||||
@Override
|
||||
protected void initChannel(Channel ch) throws Exception {
|
||||
|
@ -89,6 +89,7 @@ public final class ConnectionManager {
|
||||
ch.pipeline().addLast(Connections.HANDLER, connection);
|
||||
}
|
||||
})
|
||||
.childOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, CLIENT_READ_TIMEOUT_SECONDS * 1000)
|
||||
.childOption(ChannelOption.TCP_NODELAY, true)
|
||||
.childOption(ChannelOption.IP_TOS, 0x18)
|
||||
.localAddress(address);
|
||||
|
Loading…
Reference in New Issue
Block a user