Browse Source

Pull request #2831: REPORT-42970 添加websocket 断开/失败时的日志

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '68ae90069b9719d8b80695de4d6eafc7d6af7817':
  REPORT-42970  添加websocket 断开/失败时的日志
feature/big-screen
Hades 4 years ago
parent
commit
506e6d9b5a
  1. 3
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

3
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -27,6 +27,7 @@ import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import io.socket.emitter.Emitter; import io.socket.emitter.Emitter;
import java.util.Arrays;
import javax.swing.*; import javax.swing.*;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
@ -130,6 +131,7 @@ public class DesignerSocketIO {
private static final Emitter.Listener failRetry = new Emitter.Listener() { private static final Emitter.Listener failRetry = new Emitter.Listener() {
@Override @Override
public void call(Object... args) { public void call(Object... args) {
FineLoggerFactory.getLogger().error("failed args: {}", Arrays.toString(args));
status = Status.Disconnecting; status = Status.Disconnecting;
socket.close(); socket.close();
count++; count++;
@ -160,6 +162,7 @@ public class DesignerSocketIO {
* todo 远程心跳断开不一定 socket 断开 和远程紧密相关的业务都绑定在心跳上切换成心跳断开之后进行提醒 * todo 远程心跳断开不一定 socket 断开 和远程紧密相关的业务都绑定在心跳上切换成心跳断开之后进行提醒
* socket 只用推日志和通知配置变更 * socket 只用推日志和通知配置变更
*/ */
FineLoggerFactory.getLogger().error("disConnected args: {}", Arrays.toString(objects));
if (status != Status.Disconnecting) { if (status != Status.Disconnecting) {
showConnectionLostDialog(); showConnectionLostDialog();
} }

Loading…
Cancel
Save