Browse Source

关闭websocket

lin 4 years ago
parent
commit
017c6d353b

+ 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();