1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2026-01-04 15:31:36 +00:00

Add system property Geyser.RakSendCookie to allow disabling cookie send (#4598)

This commit is contained in:
Kas-tle
2024-04-24 06:56:15 -07:00
committed by GitHub
parent c19b4ad306
commit 2471de100b

View File

@@ -228,6 +228,9 @@ public final class GeyserServer {
int rakGlobalPacketLimit = positivePropOrDefault("Geyser.RakGlobalPacketLimit", DEFAULT_GLOBAL_PACKET_LIMIT);
this.geyser.getLogger().debug("Setting RakNet global packet limit to " + rakGlobalPacketLimit);
boolean rakSendCookie = Boolean.parseBoolean(System.getProperty("Geyser.RakSendCookie", "true"));
this.geyser.getLogger().debug("Setting RakNet send cookie to " + rakSendCookie);
return new ServerBootstrap()
.channelFactory(RakChannelFactory.server(TRANSPORT.datagramChannel()))
.group(group, childGroup)
@@ -235,7 +238,7 @@ public final class GeyserServer {
.option(RakChannelOption.RAK_MAX_MTU, this.geyser.getConfig().getMtu())
.option(RakChannelOption.RAK_PACKET_LIMIT, rakPacketLimit)
.option(RakChannelOption.RAK_GLOBAL_PACKET_LIMIT, rakGlobalPacketLimit)
.option(RakChannelOption.RAK_SEND_COOKIE, true)
.option(RakChannelOption.RAK_SEND_COOKIE, rakSendCookie)
.childHandler(serverInitializer);
}