3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-09-29 06:30:16 +02:00

Fix connection error spamming (#847)

* Fix "pointers" for players never being used lol

* Added Platform Facet API to add Type pointers

* Remove duplicate

* Fix some connection things

* Make checkstyle happy?
Dieser Commit ist enthalten in:
OOP-778 2022-08-20 05:46:57 +03:00 committet von GitHub
Ursprung 47cd9faf65
Commit cae41c33a1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -706,6 +706,11 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
switch (status.getStatus()) {
// Impossible/nonsensical cases
case ALREADY_CONNECTED:
logger.error("{}: already connected to {}",
this,
status.getAttemptedConnection().getServerInfo().getName()
);
break;
case CONNECTION_IN_PROGRESS:
// Fatal case
case CONNECTION_CANCELLED:
@ -1179,12 +1184,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
if (status != null && !status.isSuccessful()) {
if (!status.isSafe()) {
handleConnectionException(status.getAttemptedConnection(), throwable, false);
return;
}
}
if (throwable != null) {
logger.error("Exception during connect; status = {}", status, throwable);
}
}, connection.eventLoop())
.thenApply(x -> x);
}