From 096415cf8eb838ff61f1d5d469f5ea335b373049 Mon Sep 17 00:00:00 2001 From: Juan Cruz Linsalata <25271111+linsaftw@users.noreply.github.com> Date: Sun, 2 May 2021 10:52:07 -0300 Subject: [PATCH] Don't inject if inactive (#2461) --- .../viaversion/bungee/handlers/BungeeChannelInitializer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bungee/src/main/java/com/viaversion/viaversion/bungee/handlers/BungeeChannelInitializer.java b/bungee/src/main/java/com/viaversion/viaversion/bungee/handlers/BungeeChannelInitializer.java index 348c383e6..36c1e305a 100644 --- a/bungee/src/main/java/com/viaversion/viaversion/bungee/handlers/BungeeChannelInitializer.java +++ b/bungee/src/main/java/com/viaversion/viaversion/bungee/handlers/BungeeChannelInitializer.java @@ -51,6 +51,7 @@ public class BungeeChannelInitializer extends ChannelInitializer { // Add originals this.method.invoke(this.original, socketChannel); + if (!socketChannel.isActive()) return; // Don't inject if inactive if (socketChannel.pipeline().get("packet-encoder") == null) return; // Don't inject if no packet-encoder if (socketChannel.pipeline().get("packet-decoder") == null) return; // Don't inject if no packet-decoder // Add our transformers