fix(ecom): 导入任务 SSE 通知相关小修复

This commit is contained in:
小蟑螂
2026-05-06 03:54:09 +08:00
parent b7e4b6a77b
commit 955b29c750
3 changed files with 13 additions and 8 deletions
@@ -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
);