From 0c7a9957678f9546f97842d28158053ef7435910 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 20 Jan 2020 17:37:21 -0500 Subject: [PATCH] Don't attempt to retain the buffer if it goes to a closed connection --- .../proxy/connection/client/ClientPlaySessionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index e9d099d68..aa5ff5329 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -273,7 +273,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { } MinecraftConnection smc = serverConnection.getConnection(); - if (smc != null && serverConnection.getPhase().consideredComplete()) { + if (smc != null && !smc.isClosed() && serverConnection.getPhase().consideredComplete()) { smc.write(buf.retain()); } }