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

Merge branch 'dev/1.1.0' into decode-multiple

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-03 12:18:43 -04:00
Commit ee4bae60a9
2 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -84,9 +84,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
connectionPhase = connection.getType().getInitialBackendPhase();
startHandshake();
} else {
// We need to remember to reset the in-flight connection to allow connect() to work
// properly.
proxyPlayer.resetInFlightConnection();
// Complete the result immediately. ConnectedPlayer will reset the in-flight connection.
result.completeExceptionally(future.cause());
}
});

Datei anzeigen

@ -758,12 +758,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
ConnectedPlayer.this, server);
connectionInFlight = con;
return con.connect().whenCompleteAsync((result, throwable) ->
this.cleanupIfRequired(con), connection.eventLoop());
this.resetIfInFlightIs(con), connection.eventLoop());
}, connection.eventLoop());
});
}
private void cleanupIfRequired(VelocityServerConnection establishedConnection) {
private void resetIfInFlightIs(VelocityServerConnection establishedConnection) {
if (establishedConnection == connectionInFlight) {
resetInFlightConnection();
}