From 76374c5ea96c9ac03aff728457181e7c41fba1d9 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 21 Jul 2021 10:20:05 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-53900=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E8=87=AA=E5=8A=A8=E6=96=AD=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/socketio/DesignerSocketIO.java | 53 ++++++++++++++----- 1 file changed, 40 insertions(+), 13 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 33b3b80f7..157ce6f98 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 @@ -32,6 +32,8 @@ import javax.swing.*; import java.io.IOException; import java.net.URI; import java.net.URL; +import java.util.Timer; +import java.util.TimerTask; public class DesignerSocketIO { @@ -45,7 +47,7 @@ public class DesignerSocketIO { if (DesignerEnvManager.getEnvManager().isHttps()) { showConnectionLostDialog(); } - } + } }); } @@ -57,6 +59,8 @@ public class DesignerSocketIO { private static Socket socket = null; private static Status status = Status.Disconnected; + private static Timer disConnectHintTimer = null; + private static long disConnectHintTimerDelay = 3000; //维护一个当前工作环境的uri列表 private static String[] uri; //维护一个关于uri列表的计数器 @@ -87,18 +91,19 @@ public class DesignerSocketIO { createSocket(); } - private static void createSocket(){ + private static void createSocket() { //根据uri和计数器建立连接,并注册监听 try { - if(count