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

Fallback to next server on connection error

Closes #11

Co-authored-by: Dylan Keir <jinjaproductionz@gmail.com>
Signed-off-by: Jadon Fowler <jadonflower@gmail.com>
Dieser Commit ist enthalten in:
Jadon Fowler 2018-08-21 11:45:07 -07:00
Ursprung fcf5ad157f
Commit 65de126934
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B98B526268287A29

Datei anzeigen

@ -177,7 +177,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
if (connectedServer == null || connectedServer.getServerInfo().equals(info)) {
// The player isn't yet connected to a server or they are already connected to the server
// they're disconnected from.
connection.closeWith(Disconnect.create(disconnectReason));
Optional<ServerInfo> nextServer = getNextServerToTry();
if (nextServer.isPresent()) {
createConnectionRequest(nextServer.get()).fireAndForget();
} else {
connection.closeWith(Disconnect.create(disconnectReason));
}
} else {
connection.write(Chat.create(disconnectReason));
}