From 77f6930280f7dafa86891105c6960c9bc9dcca44 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 11 Jun 2014 16:07:14 +1000 Subject: [PATCH] Mojang allows multiple status queries in a connection, we should too. --- .../java/net/md_5/bungee/connection/InitialHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 023e7db0..cdc411ae 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 @@ -95,7 +95,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection private enum State { - HANDSHAKE, STATUS, PING, USERNAME, ENCRYPT, FINISHED; + HANDSHAKE, STATUS, USERNAME, ENCRYPT, FINISHED; } @Override @@ -185,16 +185,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection motd, BungeeCord.getInstance().config.getFaviconObject() ), null ); } - - thisState = State.PING; } @Override public void handle(PingPacket ping) throws Exception { - Preconditions.checkState( thisState == State.PING, "Not expecting PING" ); + Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" ); unsafe.sendPacket( ping ); - disconnect( "" ); } @Override