fix 修复 登出后重新登录 sse推送报错问题
This commit is contained in:
parent
bd872f624a
commit
7297053dd6
@ -1,5 +1,6 @@
|
||||
package org.dromara.common.sse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
@ -26,6 +27,7 @@ public class SseController {
|
||||
return sseEmitterManager.connect(userId, tokenValue);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@GetMapping(value = "${sse.path}/close")
|
||||
public R<Void> close() {
|
||||
String tokenValue = StpUtil.getTokenValue();
|
||||
|
@ -73,7 +73,6 @@ public class SseEmitterManager {
|
||||
try {
|
||||
entry.getValue().send(SseEmitter.event()
|
||||
.name("message")
|
||||
.reconnectTime(-1L)
|
||||
.data(message));
|
||||
} catch (Exception e) {
|
||||
emitters.remove(entry.getKey());
|
||||
|
Loading…
x
Reference in New Issue
Block a user