3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-24 15:20:35 +01:00

Work around kqueue transport bug with fallback connections.

Dieser Commit ist enthalten in:
Andrew Steinborn 2019-05-27 14:00:20 -04:00
Ursprung 5baf3c8236
Commit 4e71788aba

Datei anzeigen

@ -404,15 +404,18 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
} }
if (connectedServer == null) { if (connectedServer == null) {
// The player isn't yet connected to a server. // The player isn't yet connected to a server. Note that we need to do this in a future run
Optional<RegisteredServer> nextServer = getNextServerToTry(rs); // of the event loop due to an issue with the Netty kqueue transport.
if (nextServer.isPresent()) { minecraftConnection.eventLoop().execute(() -> {
// There can't be any connection in flight now. Optional<RegisteredServer> nextServer = getNextServerToTry(rs);
resetInFlightConnection(); if (nextServer.isPresent()) {
createConnectionRequest(nextServer.get()).fireAndForget(); // There can't be any connection in flight now.
} else { resetInFlightConnection();
disconnect(friendlyReason); createConnectionRequest(nextServer.get()).fireAndForget();
} } else {
disconnect(friendlyReason);
}
});
} else { } else {
boolean kickedFromCurrent = connectedServer.getServer().equals(rs); boolean kickedFromCurrent = connectedServer.getServer().equals(rs);
ServerKickResult result; ServerKickResult result;