Fixes Situations Where TCP Connections Might be Refused

This commit is contained in:
马一丁
2025-11-22 02:06:53 +08:00
parent 56b6bdd1b4
commit a22be6d7dd
3 changed files with 98 additions and 7 deletions
+7
View File
@@ -2562,6 +2562,7 @@
// 切换应用
function switchToApp(app) {
if (app === currentApp) return;
const previousApp = currentApp;
// 检查Report Engine是否被锁定
if (app === 'report') {
@@ -2636,6 +2637,12 @@
} else {
// 【修复】切换离开Report Engine时停止日志刷新,节省资源
reportLogManager.stop();
// 离开Report且无任务运行时,关闭SSE避免后台悬挂
if (previousApp === 'report' && !reportTaskId && reportEventSource) {
safeCloseReportStream(true);
stopProgressPolling();
}
}
}