From 21c8a389e30ee9b882834d7dc8121694d5d97460 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Sat, 3 Apr 2021 19:50:35 +0200 Subject: [PATCH] Fixed an issue with forwarding player links --- .../java/org/geysermc/floodgate/util/BedrockData.java | 3 +-- .../geysermc/connector/skin/FloodgateSkinUploader.java | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/org/geysermc/floodgate/util/BedrockData.java b/common/src/main/java/org/geysermc/floodgate/util/BedrockData.java index cbf49e126..81a6307a2 100644 --- a/common/src/main/java/org/geysermc/floodgate/util/BedrockData.java +++ b/common/src/main/java/org/geysermc/floodgate/util/BedrockData.java @@ -101,9 +101,8 @@ public final class BedrockData implements Cloneable { // The format is the same as the order of the fields in this class return version + '\0' + username + '\0' + xuid + '\0' + deviceOs + '\0' + languageCode + '\0' + uiProfile + '\0' + inputMode + '\0' + ip + '\0' + - (fromProxy ? 1 : 0) + '\0' + (linkedPlayer != null ? linkedPlayer.toString() : "null") + '\0' + - subscribeId + '\0' + verifyCode + '\0' + timestamp; + (fromProxy ? 1 : 0) + '\0' + subscribeId + '\0' + verifyCode + '\0' + timestamp; } @Override diff --git a/connector/src/main/java/org/geysermc/connector/skin/FloodgateSkinUploader.java b/connector/src/main/java/org/geysermc/connector/skin/FloodgateSkinUploader.java index 9f1a515a0..d61d3b632 100644 --- a/connector/src/main/java/org/geysermc/connector/skin/FloodgateSkinUploader.java +++ b/connector/src/main/java/org/geysermc/connector/skin/FloodgateSkinUploader.java @@ -39,6 +39,7 @@ import org.geysermc.floodgate.util.WebsocketEventType; import org.java_websocket.client.WebSocketClient; import org.java_websocket.handshake.ServerHandshake; +import javax.net.ssl.SSLException; import java.net.ConnectException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -161,9 +162,13 @@ public final class FloodgateSkinUploader { @Override public void onError(Exception ex) { - if (!(ex instanceof ConnectException)) { - logger.error("Got an error", ex); + if (ex instanceof ConnectException || ex instanceof SSLException) { + if (logger.isDebug()) { + logger.error("[debug] Got an error", ex); + } + return; } + logger.error("Got an error", ex); } }; }