From c64d16326cf2d5c25f208c96661b336521305c32 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 8 Aug 2019 17:22:38 -0400 Subject: [PATCH] Fix bug where connect() wouldn't reset in-flight connections --- .../proxy/connection/client/ConnectedPlayer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 65b6d800b..3c9a5cae4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -747,8 +747,10 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { if (status != null && !status.isSafe()) { // If it's not safe to continue the connection we need to shut it down. handleConnectionException(status.getAttemptedConnection(), throwable, true); + } else if ((status != null && !status.isSuccessful())) { + resetInFlightConnection(); } - }) + }, minecraftConnection.eventLoop()) .thenApply(x -> x); }