Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix coding error that caused players to time out if moving to another server fails
Thanks to @Gabik21 for noticing this bug.
Dieser Commit ist enthalten in:
Ursprung
b26c9026d3
Commit
60eef09fdd
@ -430,17 +430,20 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
}
|
||||
KickedFromServerEvent originalEvent = new KickedFromServerEvent(this, rs, kickReason,
|
||||
!kickedFromCurrent, result);
|
||||
handleKickEvent(originalEvent, friendlyReason);
|
||||
handleKickEvent(originalEvent, friendlyReason, kickedFromCurrent);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleKickEvent(KickedFromServerEvent originalEvent, Component friendlyReason) {
|
||||
private void handleKickEvent(KickedFromServerEvent originalEvent, Component friendlyReason,
|
||||
boolean kickedFromCurrent) {
|
||||
server.getEventManager().fire(originalEvent)
|
||||
.thenAcceptAsync(event -> {
|
||||
// There can't be any connection in flight now.
|
||||
connectionInFlight = null;
|
||||
// Make sure we clear the current connected server as the connection is invalid.
|
||||
if (kickedFromCurrent) {
|
||||
connectedServer = null;
|
||||
}
|
||||
|
||||
if (event.getResult() instanceof DisconnectPlayer) {
|
||||
DisconnectPlayer res = (DisconnectPlayer) event.getResult();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren