From bcf77613807c995a4203f3619a5749e22bcd4bc9 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 23 Oct 2018 13:51:33 -0400 Subject: [PATCH] Disable auto-read temporarily as well --- .../proxy/connection/backend/LoginSessionHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java index 44de88b9b..5ed4a408b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java @@ -104,11 +104,13 @@ public class LoginSessionHandler implements MinecraftSessionHandler { existingConnection.disconnect(); } + serverConn.getConnection().getChannel().config().setAutoRead(false); server.getEventManager().fire(new ServerConnectedEvent(serverConn.getPlayer(), serverConn.getServer())) .whenCompleteAsync((x, error) -> { resultFuture.complete(ConnectionRequestResults.SUCCESSFUL); serverConn.getConnection().setSessionHandler(new BackendPlaySessionHandler(server, serverConn)); serverConn.getPlayer().setConnectedServer(serverConn); + serverConn.getConnection().getChannel().config().setAutoRead(true); }, serverConn.getConnection().eventLoop()); return true; }