From 9992d53bf2b5f226ed5a6f6087affd04edb9c25f Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 24 Aug 2021 19:48:29 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-55048=20fix=E8=B0=83=E6=95=B4=E4=B8=8B?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/socketio/DesignerSocketIO.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 648d7cdde..782c7f35d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -161,10 +161,6 @@ public class DesignerSocketIO { // 服务器配置https webSocket可能是wss也可能是ws webSocket的协议可以单独配置 WebSocketProtocol webSocketProtocol = WebSocketConfig.getInstance().getProtocol(); currentProtocol = webSocketProtocol == WebSocketProtocol.PLAIN ? HTTP : HTTPS; - if (WebSocketConfig.getInstance().isUsingProxy()) { - // 如果配置了代理服务器跟随服务器协议 - currentProtocol = url.getProtocol(); - } String[] result = new String[ports.length]; for (int i = 0; i < ports.length; i++) { result[i] = String.format("%s://%s:%s%s?%s=%s&%s=%s", @@ -279,7 +275,7 @@ public class DesignerSocketIO { for (Object object : objects) { if (object instanceof Throwable) { Throwable throwable = (Throwable) object; - printEventLog.printThrowable(throwable.getMessage(), throwable); + printEventLog.printThrowable(throwable); } else { printEventLog.print(prefix, object); } @@ -287,15 +283,15 @@ public class DesignerSocketIO { } interface PrintEventLog { - void printThrowable(String s, Throwable throwable); + void printThrowable(Throwable throwable); void print(String s, Object ...object); } enum PrintEventLogImpl implements PrintEventLog { ERROR { @Override - public void printThrowable(String s, Throwable throwable) { - FineLoggerFactory.getLogger().error(s, throwable); + public void printThrowable(Throwable throwable) { + FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable); } @Override @@ -306,8 +302,8 @@ public class DesignerSocketIO { WARN { @Override - public void printThrowable(String s, Throwable throwable) { - FineLoggerFactory.getLogger().warn(s, throwable); + public void printThrowable(Throwable throwable) { + FineLoggerFactory.getLogger().warn(throwable.getMessage(), throwable); } @Override