From 03c9729e638e3ddb31eff088fe209053e64f3540 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 29 Jul 2019 14:19:21 -0400 Subject: [PATCH] Don't disconnect the player if the connection unexpectedly closes --- .../proxy/connection/backend/BackendPlaySessionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java index 64c72042a..571a7323c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java @@ -193,7 +193,8 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler { public void disconnected() { serverConn.getServer().removePlayer(serverConn.getPlayer()); if (!serverConn.isGracefulDisconnect() && !exceptionTriggered) { - serverConn.getPlayer().disconnect(ConnectionMessages.UNEXPECTED_DISCONNECT); + serverConn.getPlayer().handleConnectionException(serverConn.getServer(), + Disconnect.create(ConnectionMessages.UNEXPECTED_DISCONNECT), true); } } }