Browse Source

return

feature/big-screen
Maksim 5 years ago
parent
commit
1f1d01fc56
  1. 10
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

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

@ -60,14 +60,14 @@ public class DesignerSocketIO {
try {
uri = getSocketUri();
} catch (IOException e) {
e.printStackTrace();
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
count = 0;
//建立socket并注册监听
CreateSocket();
createSocket();
}
private static void CreateSocket(){
private static void createSocket(){
//根据uri和计数器建立连接,并注册监听
try {
if(count<uri.length) {
@ -80,7 +80,7 @@ public class DesignerSocketIO {
status = Status.Connected;
}else {
//表示所有的uri都连接不成功
FineLoggerFactory.getLogger().warn("所有URI均连接失败");
FineLoggerFactory.getLogger().warn("All uris failed to connect");
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -114,7 +114,7 @@ public class DesignerSocketIO {
status = Status.Disconnecting;
socket.close();
count++;
CreateSocket();
createSocket();
}
};

Loading…
Cancel
Save