Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Reset in-flight connection only if the server disconnects the client.
Dieser Commit ist enthalten in:
Ursprung
b0f1398b45
Commit
64c16e61d2
@ -766,12 +766,13 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
public CompletableFuture<Result> connect() {
|
public CompletableFuture<Result> connect() {
|
||||||
return this.internalConnect()
|
return this.internalConnect()
|
||||||
.whenCompleteAsync((status, throwable) -> {
|
.whenCompleteAsync((status, throwable) -> {
|
||||||
if (status != null && !status.isSafe()) {
|
if (status != null && !status.isSuccessful()) {
|
||||||
// If it's not safe to continue the connection we need to shut it down.
|
if (!status.isSafe()) {
|
||||||
handleConnectionException(status.getAttemptedConnection(), throwable, true);
|
handleConnectionException(status.getAttemptedConnection(), throwable, false);
|
||||||
} else if ((status != null && !status.isSuccessful())) {
|
} else if (status.getStatus() == Status.SERVER_DISCONNECTED) {
|
||||||
resetInFlightConnection();
|
resetInFlightConnection();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, connection.eventLoop())
|
}, connection.eventLoop())
|
||||||
.thenApply(x -> x);
|
.thenApply(x -> x);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren