hzzz 7 years ago
parent
commit
c6d3565aa7
  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

@ -29,6 +29,7 @@ import java.net.URL;
public class DesignerSocketIO { public class DesignerSocketIO {
private static Optional<Socket> socketIO = Optional.absent(); private static Optional<Socket> socketIO = Optional.absent();
public static final String CLIENT_CLOSE = "io client disconnect";
private static final Emitter.Listener printLog = new Emitter.Listener() { private static final Emitter.Listener printLog = new Emitter.Listener() {
@Override @Override
@ -71,9 +72,11 @@ public class DesignerSocketIO {
socketIO.get().on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { socketIO.get().on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
@Override @Override
public void call(Object... objects) { public void call(Object... objects) {
if (!CLIENT_CLOSE.equals(objects[0].toString())) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}), JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}),
null, 0, UIManager.getIcon("OptionPane.errorIcon")); null, 0, UIManager.getIcon("OptionPane.errorIcon"));
} }
}
}); });
socketIO.get().connect(); socketIO.get().connect();
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save