mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Don't add invalid packet handler twice to subclient sessions
This commit is contained in:
@@ -62,8 +62,10 @@ public class GeyserServerInitializer extends BedrockServerInitializer {
|
|||||||
bedrockServerSession.setLogging(true);
|
bedrockServerSession.setLogging(true);
|
||||||
GeyserSession session = new GeyserSession(this.geyser, bedrockServerSession, this.eventLoopGroup.next());
|
GeyserSession session = new GeyserSession(this.geyser, bedrockServerSession, this.eventLoopGroup.next());
|
||||||
|
|
||||||
|
if (!bedrockServerSession.isSubClient()) {
|
||||||
Channel channel = bedrockServerSession.getPeer().getChannel();
|
Channel channel = bedrockServerSession.getPeer().getChannel();
|
||||||
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
|
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
|
||||||
|
}
|
||||||
|
|
||||||
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(this.geyser, session));
|
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(this.geyser, session));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user