mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 04:29:21 +08:00
fix(ecom): 导入任务 SSE 通知相关小修复
This commit is contained in:
+2
-1
@@ -200,9 +200,10 @@ public class SseNotificationServiceImpl implements SseNotificationService {
|
||||
List<EmitterEntry> entries = userConnections.get(userId);
|
||||
if (entries == null || entries.isEmpty()) return;
|
||||
|
||||
// initialDelay=0:连接建立后尽快发首帧 ping,避免客户端在「首 ping 前」用短窗口误判超时
|
||||
ScheduledFuture<?> task = scheduler.scheduleAtFixedRate(
|
||||
() -> heartbeatForUser(userId),
|
||||
HEARTBEAT_INTERVAL_SECONDS,
|
||||
0,
|
||||
HEARTBEAT_INTERVAL_SECONDS,
|
||||
TimeUnit.SECONDS
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user