diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java index d9210e636..2361d6cb9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -225,13 +225,13 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { public void closeWith(Object msg) { if (channel.isActive()) { boolean is1Point8 = this.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0; - boolean isLegacyPing = this.getState() == StateRegistry.HANDSHAKE + boolean isLegacyOrPing = this.getState() == StateRegistry.HANDSHAKE || this.getState() == StateRegistry.STATUS; - if (channel.eventLoop().inEventLoop() && (is1Point8 || isLegacyPing)) { + if (channel.eventLoop().inEventLoop() && (is1Point8 || isLegacyOrPing)) { knownDisconnect = true; channel.writeAndFlush(msg).addListener(ChannelFutureListener.CLOSE); } else { - // 1.7.x versions have a race condition with switching protocol versions, so just explicitly + // 1.7.x versions have a race condition with switching protocol states, so just explicitly // close the connection after a short while. this.setAutoReading(false); channel.eventLoop().schedule(() -> {