Browse Source

退出登录

humuyu 3 năm trước cách đây
mục cha
commit
440953ba70

+ 1 - 3
eladmin-system/src/main/java/me/zhengjie/base/websocket/SocketEventListenner.java

@@ -21,8 +21,6 @@ import com.corundumstudio.socketio.annotation.OnEvent;
 
 import lombok.extern.slf4j.Slf4j;
 import me.zhengjie.security.service.OnlineUserService;
-import me.zhengjie.utils.SpringContextHolder;
-
 /**
  * @author litong
  * @date 2019/11/6 15:59
@@ -52,7 +50,6 @@ public class SocketEventListenner {
 		if (StringUtils.isNotBlank(pcSname)) {
 			client.sendEvent("connectSucc", "success");
 			System.out.println("pc建立连接");
-
 		}
 		String appSname = handshakeData.getSingleUrlParam("appSname");
 		if (StringUtils.isNotBlank(appSname)) {
@@ -119,6 +116,7 @@ public class SocketEventListenner {
 			if (socketIOClient != null) {
 				Collection<SocketIOClient> collection = socketIOClient.values();
 				for (SocketIOClient ioClient : collection) {
+					log.info("发送推出登录:" + pcSname);
 					ioClient.sendEvent("logoutEvent", "close");
 				}
 				for (SocketIOClient ioClient : collection) {