From cae41c33a1a758f5ecd0a4361c04e8652dd67072 Mon Sep 17 00:00:00 2001 From: OOP-778 <33358441+OOP-778@users.noreply.github.com> Date: Sat, 20 Aug 2022 05:46:57 +0300 Subject: [PATCH] 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? --- .../proxy/connection/client/ConnectedPlayer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 665063cf6..0dcac9da9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -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); }