13
0
geforkt von Mirrors/Velocity

Confine preconnect validation/setup logic to event loop.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-05-25 09:38:22 -04:00
Ursprung 91e9769c5a
Commit fa954ab717

Datei anzeigen

@ -733,7 +733,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
// Otherwise, initiate the connection.
ServerPreConnectEvent event = new ServerPreConnectEvent(ConnectedPlayer.this, toConnect);
return server.getEventManager().fire(event)
.thenCompose(newEvent -> {
.thenComposeAsync(newEvent -> {
Optional<RegisteredServer> connectTo = newEvent.getResult().getServer();
if (!connectTo.isPresent()) {
return CompletableFuture.completedFuture(
@ -754,7 +754,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
server);
connectionInFlight = con;
return con.connect();
});
}, connection.eventLoop());
}
@Override