Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix another case where an in-flight connection would be retained.
Dieser Commit ist enthalten in:
Ursprung
1ec070069f
Commit
c6dcba36c3
@ -362,7 +362,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
Optional<RegisteredServer> nextServer = getNextServerToTry(rs);
|
Optional<RegisteredServer> nextServer = getNextServerToTry(rs);
|
||||||
if (nextServer.isPresent()) {
|
if (nextServer.isPresent()) {
|
||||||
// There can't be any connection in flight now.
|
// There can't be any connection in flight now.
|
||||||
connectionInFlight = null;
|
resetInFlightConnection();
|
||||||
|
|
||||||
createConnectionRequest(nextServer.get()).fireAndForget();
|
createConnectionRequest(nextServer.get()).fireAndForget();
|
||||||
} else {
|
} else {
|
||||||
@ -376,6 +376,10 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
result = next.<ServerKickResult>map(RedirectPlayer::create)
|
result = next.<ServerKickResult>map(RedirectPlayer::create)
|
||||||
.orElseGet(() -> DisconnectPlayer.create(friendlyReason));
|
.orElseGet(() -> DisconnectPlayer.create(friendlyReason));
|
||||||
} else {
|
} else {
|
||||||
|
// If we were kicked by going to another server, the connection should not be in flight
|
||||||
|
if (connectionInFlight != null && connectionInFlight.getServer().equals(rs)) {
|
||||||
|
resetInFlightConnection();
|
||||||
|
}
|
||||||
result = Notify.create(friendlyReason);
|
result = Notify.create(friendlyReason);
|
||||||
}
|
}
|
||||||
KickedFromServerEvent originalEvent = new KickedFromServerEvent(this, rs, kickReason,
|
KickedFromServerEvent originalEvent = new KickedFromServerEvent(this, rs, kickReason,
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren