Skip to content

Commit c0b4579

Browse files
committed
Don't add invalid packet handler twice to subclient sessions
1 parent 846e0b5 commit c0b4579

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/org/geysermc/geyser/network/GeyserServerInitializer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ public void initSession(@NonNull BedrockServerSession bedrockServerSession) {
6262
bedrockServerSession.setLogging(true);
6363
GeyserSession session = new GeyserSession(this.geyser, bedrockServerSession, this.eventLoopGroup.next());
6464

65-
Channel channel = bedrockServerSession.getPeer().getChannel();
66-
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
65+
if (!bedrockServerSession.isSubClient()) {
66+
Channel channel = bedrockServerSession.getPeer().getChannel();
67+
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
68+
}
6769

6870
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(this.geyser, session));
6971
} catch (Throwable e) {

0 commit comments

Comments
 (0)