3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Fix bug in VelocityRegisteredServer#ping()

Dieser Commit ist enthalten in:
Andrew Steinborn 2023-10-28 19:53:29 -04:00
Ursprung ae63da6836
Commit 74033addbe

Datei anzeigen

@ -124,9 +124,10 @@ public class VelocityRegisteredServer implements RegisteredServer, ForwardingAud
}).connect(serverInfo.getAddress()).addListener((ChannelFutureListener) future -> { }).connect(serverInfo.getAddress()).addListener((ChannelFutureListener) future -> {
if (future.isSuccess()) { if (future.isSuccess()) {
MinecraftConnection conn = future.channel().pipeline().get(MinecraftConnection.class); MinecraftConnection conn = future.channel().pipeline().get(MinecraftConnection.class);
conn.setActiveSessionHandler(StateRegistry.HANDSHAKE, PingSessionHandler handler = new PingSessionHandler(pingFuture,
new PingSessionHandler(pingFuture, VelocityRegisteredServer.this, conn, VelocityRegisteredServer.this, conn, pingOptions.getProtocolVersion());
pingOptions.getProtocolVersion())); conn.setActiveSessionHandler(StateRegistry.HANDSHAKE, handler);
conn.addSessionHandler(StateRegistry.LOGIN, handler);
} else { } else {
pingFuture.completeExceptionally(future.cause()); pingFuture.completeExceptionally(future.cause());
} }