From 5b518eaf20ebc6e72bf4b67d0651b31fd49da9b8 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 2 Jul 2019 02:36:46 -0400 Subject: [PATCH] Remove kqueue bug workaround since the issue is now fixed upstream See https://github.com/netty/netty/pull/9149 --- .../connection/client/ConnectedPlayer.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 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 7589300fa..19fedd546 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 @@ -404,18 +404,14 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } if (connectedServer == null) { - // The player isn't yet connected to a server. Note that we need to do this in a future run - // of the event loop due to an issue with the Netty kqueue transport. - minecraftConnection.eventLoop().execute(() -> { - Optional nextServer = getNextServerToTry(rs); - if (nextServer.isPresent()) { - // There can't be any connection in flight now. - resetInFlightConnection(); - createConnectionRequest(nextServer.get()).fireAndForget(); - } else { - disconnect(friendlyReason); - } - }); + Optional nextServer = getNextServerToTry(rs); + if (nextServer.isPresent()) { + // There can't be any connection in flight now. + resetInFlightConnection(); + createConnectionRequest(nextServer.get()).fireAndForget(); + } else { + disconnect(friendlyReason); + } } else { boolean kickedFromCurrent = connectedServer.getServer().equals(rs); ServerKickResult result;