瀏覽代碼

关闭websocket

lin 4 年之前
父節點
當前提交
017c6d353b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      smart-city-platform/src/main/java/com/bz/smart_city/websocket/WebSocketServer.java

+ 2 - 2
smart-city-platform/src/main/java/com/bz/smart_city/websocket/WebSocketServer.java

@@ -24,13 +24,13 @@ public class WebSocketServer {
 
     private ChannelFuture serverChannelFuture;
 
-    @PostConstruct
+    //@PostConstruct
     public void start() throws Exception {
         log.info("Starting server at " + webSocketPort);
         serverChannelFuture = b.bind(webSocketPort).sync();
     }
 
-    @PreDestroy
+    //@PreDestroy
     public void stop() throws Exception {
         log.info("stop server at " + webSocketPort);
         serverChannelFuture.channel().closeFuture().sync();