mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-10-14 14:10:24 +00:00
fix 修复 sse关闭 用户id或token为空报错问题
This commit is contained in:
@@ -65,6 +65,9 @@ public class SseEmitterManager {
|
||||
* @param token 用户的唯一令牌,用于识别具体的连接
|
||||
*/
|
||||
public void disconnect(Long userId, String token) {
|
||||
if (userId == null || token == null) {
|
||||
return;
|
||||
}
|
||||
Map<String, SseEmitter> emitters = USER_TOKEN_EMITTERS.get(userId);
|
||||
if (MapUtil.isNotEmpty(emitters)) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user