diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/sessionManager/InteractiveSessionManager.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/sessionManager/InteractiveSessionManager.java index 4458970..ea022cc 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/sessionManager/InteractiveSessionManager.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/sessionManager/InteractiveSessionManager.java @@ -43,7 +43,7 @@ public class InteractiveSessionManager { public static Map.Entry getEntryBySession(WebSocketSession session) { Set> sessionEntrySet = InteractiveSessionManager.SESSION_POOL.entrySet(); Optional> sessionIdOptional = sessionEntrySet.stream().filter(sessionEntry -> session.equals(sessionEntry.getValue())).findFirst(); - if(sessionIdOptional.isPresent()) { + if(!sessionIdOptional.isPresent()) { log.error("当前Session Pool未查询到相关session,消息推送失败"); throw new ServiceException("当前Session Pool未查询到相关session,消息推送失败"); }