diff --git a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java index 928b4ee72..ca609460f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java @@ -124,9 +124,10 @@ public class VelocityRegisteredServer implements RegisteredServer, ForwardingAud }).connect(serverInfo.getAddress()).addListener((ChannelFutureListener) future -> { if (future.isSuccess()) { MinecraftConnection conn = future.channel().pipeline().get(MinecraftConnection.class); - conn.setActiveSessionHandler(StateRegistry.HANDSHAKE, - new PingSessionHandler(pingFuture, VelocityRegisteredServer.this, conn, - pingOptions.getProtocolVersion())); + PingSessionHandler handler = new PingSessionHandler(pingFuture, + VelocityRegisteredServer.this, conn, pingOptions.getProtocolVersion()); + conn.setActiveSessionHandler(StateRegistry.HANDSHAKE, handler); + conn.addSessionHandler(StateRegistry.LOGIN, handler); } else { pingFuture.completeExceptionally(future.cause()); }