|
@@ -85,6 +85,10 @@ public class WebSocketServer {
|
|
|
removeSensorMac();
|
|
|
subOnlineCount(); //在线数减1
|
|
|
redisMessageListenerContainer.removeMessageListener(subscribeListener);
|
|
|
+ subscribeListener = null;
|
|
|
+ if (WebSocketServer.onlineCount.get() == 0) {
|
|
|
+ initSensorMac();
|
|
|
+ }
|
|
|
log.info("websocket有一连接关闭!当前在线人数为" + getOnlineCount());
|
|
|
}
|
|
|
|