Skip to content

Commit

Permalink
Fixed an issue with forwarding player links
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Apr 3, 2021
1 parent 23c3db2 commit 21c8a38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ public String toString() {
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
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;
Expand Down Expand Up @@ -161,9 +162,13 @@ public void onClose(int code, String reason, boolean remote) {

@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);
}
};
}
Expand Down

0 comments on commit 21c8a38

Please sign in to comment.