From 436c1624bc57a892102995279b8caca8aa650c64 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Fri, 23 Nov 2018 18:25:35 -0500 Subject: [PATCH] Make sure to mark the in-flight connection. --- .../proxy/connection/client/ConnectedPlayer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 b3ffe49be..c99a5764a 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 @@ -517,8 +517,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { return CompletableFuture .completedFuture(ConnectionRequestResults.plainResult(lastCheck.get())); } - return new VelocityServerConnection((VelocityRegisteredServer) rs, - ConnectedPlayer.this, server).connect(); + + VelocityRegisteredServer vrs = (VelocityRegisteredServer) rs; + VelocityServerConnection con = new VelocityServerConnection(vrs, ConnectedPlayer.this, + server); + connectionInFlight = con; + return con.connect(); }); }