Browse Source

添加close

xiaochan 4 months ago
parent
commit
b8bd68625b
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/main/java/thyyxxk/webserver/http/websocket/SocketV2.java

+ 5 - 5
src/main/java/thyyxxk/webserver/http/websocket/SocketV2.java

@@ -36,27 +36,27 @@ public class SocketV2 {
         json.setMode("SINGLE");
         json.setMode("SINGLE");
         getPostApi("/intergrationPlatform")
         getPostApi("/intergrationPlatform")
                 .body(JSONUtil.toJsonStr(json))
                 .body(JSONUtil.toJsonStr(json))
-                .executeAsync();
+                .executeAsync().close();
     }
     }
 
 
     public void sendUserCodeListMessage(WebSocketByListUserCode json) {
     public void sendUserCodeListMessage(WebSocketByListUserCode json) {
         json.setMode("MULTI");
         json.setMode("MULTI");
         getPostApi("/intergrationPlatform")
         getPostApi("/intergrationPlatform")
                 .body(JSONUtil.toJsonStr(json))
                 .body(JSONUtil.toJsonStr(json))
-                .executeAsync();
+                .executeAsync().close();
     }
     }
 
 
     public void sendMessageToAll(WebSocketToAll json) {
     public void sendMessageToAll(WebSocketToAll json) {
         json.setMode("ALL");
         json.setMode("ALL");
         getPostApi("/intergrationPlatform")
         getPostApi("/intergrationPlatform")
                 .body(JSONUtil.toJsonStr(json))
                 .body(JSONUtil.toJsonStr(json))
-                .executeAsync();
+                .executeAsync().close();
     }
     }
 
 
     public void sendArchiveMessage(ArchiveSocketParam json) {
     public void sendArchiveMessage(ArchiveSocketParam json) {
         getPostApi("/archive")
         getPostApi("/archive")
                 .body(JSONUtil.toJsonStr(json))
                 .body(JSONUtil.toJsonStr(json))
-                .executeAsync();
+                .executeAsync().close();
     }
     }
 
 
     public void sendTask(SocketTask task) {
     public void sendTask(SocketTask task) {
@@ -69,7 +69,7 @@ public class SocketV2 {
 
 
         getPostApi("/intergrationPlatform")
         getPostApi("/intergrationPlatform")
                 .body(js.toJSONString(0))
                 .body(js.toJSONString(0))
-                .executeAsync();
+                .executeAsync().close();
     }
     }
 
 
     /**
     /**