From 0862ba1ee5c047fbf6db4594d9196dc886a6238d 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 875ac5e3..fce9ca9d 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 @@ -265,7 +265,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 @@ -544,7 +544,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.11.0