diff --git a/src/main/java/org/nethergames/proxytransport/integration/QuicTransportServerInfo.java b/src/main/java/org/nethergames/proxytransport/integration/QuicTransportServerInfo.java index ff06dc3..91f5d18 100644 --- a/src/main/java/org/nethergames/proxytransport/integration/QuicTransportServerInfo.java +++ b/src/main/java/org/nethergames/proxytransport/integration/QuicTransportServerInfo.java @@ -21,7 +21,7 @@ import org.nethergames.proxytransport.impl.TransportChannelInitializer; import java.net.InetSocketAddress; -import java.util.HashMap; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; @@ -36,7 +36,7 @@ public class QuicTransportServerInfo extends ServerInfo { .serverInfoFactory(QuicTransportServerInfo::new) .register(); - private final HashMap> serverConnections = new HashMap<>(); + private final ConcurrentHashMap> serverConnections = new ConcurrentHashMap<>(); public QuicTransportServerInfo(String serverName, InetSocketAddress address, InetSocketAddress publicAddress) { super(serverName, address, publicAddress); @@ -86,9 +86,12 @@ private Future createServerConnection(EventLoopGroup eventLoopGroup QuicSslContext sslContext = QuicSslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).applicationProtocols("ng").build(); ChannelHandler codec = new QuicClientCodecBuilder() .sslContext(sslContext) - .maxIdleTimeout(5000, TimeUnit.MILLISECONDS) + .maxIdleTimeout(2000, TimeUnit.MILLISECONDS) .initialMaxData(10000000) .initialMaxStreamDataBidirectionalLocal(1000000) + .maxRecvUdpPayloadSize(1350) + .maxSendUdpPayloadSize(1350) + .activeMigration(false) .build(); new Bootstrap()