From 2222e21e5db34c66ba69e801e56308b6d4d9166a Mon Sep 17 00:00:00 2001 From: Techcable Date: Mon, 6 Jun 2016 13:36:10 -0600 Subject: [PATCH] Don't send KICK packets while in HANDSHAKE state diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index d6c0ce2a..62cbf70f 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -267,7 +267,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection this.handshake = handshake; ch.setVersion( handshake.getProtocolVersion() ); - // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes + // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes // with Bungee's IP forwarding, so we detect it, and remove it from the host string, for now. // We know FML appends \00FML\00. However, we need to also consider that other systems might // add their own data to the end of the string. So, we just take everything from the \0 character @@ -548,7 +548,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection @Override public void disconnect(final BaseComponent... reason) { - if ( thisState != State.STATUS && thisState != State.PING ) + if ( thisState != State.STATUS && thisState != State.PING && thisState != State.HANDSHAKE ) // Waterfall: Don't kick during handshake { ch.delayedClose( new Kick( ComponentSerializer.toString( reason ) ) ); } else -- 2.12.0