From 648c14987234b62f724bf9356d380cf398ea3bd8 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 97140e06e..19d19d9c7 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 @@ -746,8 +746,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); }