Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 23:30:26 +01:00
Merge branch 'dev/1.1.0' into decode-multiple
Dieser Commit ist enthalten in:
Commit
ee4bae60a9
@ -84,9 +84,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
connectionPhase = connection.getType().getInitialBackendPhase();
|
connectionPhase = connection.getType().getInitialBackendPhase();
|
||||||
startHandshake();
|
startHandshake();
|
||||||
} else {
|
} else {
|
||||||
// We need to remember to reset the in-flight connection to allow connect() to work
|
// Complete the result immediately. ConnectedPlayer will reset the in-flight connection.
|
||||||
// properly.
|
|
||||||
proxyPlayer.resetInFlightConnection();
|
|
||||||
result.completeExceptionally(future.cause());
|
result.completeExceptionally(future.cause());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -758,12 +758,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
ConnectedPlayer.this, server);
|
ConnectedPlayer.this, server);
|
||||||
connectionInFlight = con;
|
connectionInFlight = con;
|
||||||
return con.connect().whenCompleteAsync((result, throwable) ->
|
return con.connect().whenCompleteAsync((result, throwable) ->
|
||||||
this.cleanupIfRequired(con), connection.eventLoop());
|
this.resetIfInFlightIs(con), connection.eventLoop());
|
||||||
}, connection.eventLoop());
|
}, connection.eventLoop());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanupIfRequired(VelocityServerConnection establishedConnection) {
|
private void resetIfInFlightIs(VelocityServerConnection establishedConnection) {
|
||||||
if (establishedConnection == connectionInFlight) {
|
if (establishedConnection == connectionInFlight) {
|
||||||
resetInFlightConnection();
|
resetInFlightConnection();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren