|
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
@Slf4j
|
|
|
public class AlarmWebSocketClient extends WebSocketClient {
|
|
|
public static AlarmWebSocketClient client;
|
|
|
+ public static boolean has_close = false;
|
|
|
|
|
|
public URI serverUri;
|
|
|
|
|
@@ -34,6 +35,11 @@ public class AlarmWebSocketClient extends WebSocketClient {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
+ if (has_close) {
|
|
|
+ log.warn("onOpen refresh wait begin");
|
|
|
+ Thread.sleep(1000L * 60);
|
|
|
+ log.warn("onOpen refresh wait end");
|
|
|
+ }
|
|
|
log.warn("onOpen refresh begin");
|
|
|
JSONObject AlarmJob = new JSONObject();
|
|
|
AlarmJob.put("type", "refresh");
|
|
@@ -61,6 +67,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
|
|
|
@Override
|
|
|
public void onClose(int arg0, String arg1, boolean arg2) {
|
|
|
log.warn("onClose: " + serverUri.toString());
|
|
|
+ has_close = true;
|
|
|
// this.close_connect();
|
|
|
}
|
|
|
|