From 009ac75229725c5d83f80c6d62357b65a6b11e7b Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 14 十一月 2024 16:57:10 +0800 Subject: [PATCH] fix 修复 数据权限多角色与权限标识符共用导致的问题 https://gitee.com/dromara/RuoYi-Vue-Plus/issues/IB4CS4 --- ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/core/SseEmitterManager.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/core/SseEmitterManager.java b/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/core/SseEmitterManager.java index 0bfe0ca..c26adca 100644 --- a/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/core/SseEmitterManager.java +++ b/ruoyi-common/ruoyi-common-sse/src/main/java/org/dromara/common/sse/core/SseEmitterManager.java @@ -67,7 +67,9 @@ Map<String, SseEmitter> emitters = USER_TOKEN_EMITTERS.get(userId); if (emitters != null) { try { - emitters.get(token).send(SseEmitter.event().comment("disconnected")); + SseEmitter sseEmitter = emitters.get(token); + sseEmitter.send(SseEmitter.event().comment("disconnected")); + sseEmitter.complete(); } catch (Exception ignore) { } emitters.remove(token); -- Gitblit v1.9.3