geforkt von Mirrors/Velocity
Relay more exceptions (#446)
Dieser Commit ist enthalten in:
Ursprung
015693090f
Commit
0016f4ce19
@ -86,7 +86,7 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
|
||||
server.getEventManager()
|
||||
.fire(new ServerConnectedEvent(player, serverConn.getServer(),
|
||||
existingConnection != null ? existingConnection.getServer() : null))
|
||||
.whenCompleteAsync((x, error) -> {
|
||||
.thenRunAsync(() -> {
|
||||
// Make sure we can still transition (player might have disconnected here).
|
||||
if (!serverConn.isActive()) {
|
||||
// Connection is obsolete.
|
||||
|
@ -1000,8 +1000,10 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
VelocityServerConnection con = new VelocityServerConnection(vrs,
|
||||
ConnectedPlayer.this, server);
|
||||
connectionInFlight = con;
|
||||
return con.connect().whenCompleteAsync((result, throwable) ->
|
||||
this.resetIfInFlightIs(con), connection.eventLoop());
|
||||
return con.connect().thenApplyAsync((result) -> {
|
||||
this.resetIfInFlightIs(con);
|
||||
return result;
|
||||
}, connection.eventLoop());
|
||||
}, connection.eventLoop());
|
||||
});
|
||||
}
|
||||
@ -1019,8 +1021,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
if (status != null && !status.isSuccessful()) {
|
||||
if (!status.isSafe()) {
|
||||
handleConnectionException(status.getAttemptedConnection(), throwable, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (throwable != null) {
|
||||
logger.error("Exception during connect; status = {}", status, throwable);
|
||||
}
|
||||
}, connection.eventLoop())
|
||||
.thenApply(x -> x);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class GS4QueryHandler extends SimpleChannelInboundHandler<DatagramPacket>
|
||||
// Call event and write response
|
||||
server.getEventManager()
|
||||
.fire(new ProxyQueryEvent(isBasic ? BASIC : FULL, senderAddress, response))
|
||||
.whenCompleteAsync((event, exc) -> {
|
||||
.thenAcceptAsync((event) -> {
|
||||
// Packet header
|
||||
ByteBuf queryResponse = ctx.alloc().buffer();
|
||||
queryResponse.writeByte(QUERY_TYPE_STAT);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren