fix(core): improve shutdown cleanup, socket/stream robustness, and memory/cache handling

This commit is contained in:
2026-03-01 00:44:01 +00:00
parent 59a3f7978e
commit 74ad5cec90
13 changed files with 150 additions and 59 deletions

View File

@@ -76,8 +76,15 @@ export class OpsViewLogs extends DeesElement {
// Wait for xterm terminal to finish initializing (CDN load)
if (!chartLog.terminalReady) {
await new Promise<void>((resolve) => {
let attempts = 0;
const maxAttempts = 200; // 200 * 50ms = 10 seconds
const check = () => {
if (chartLog.terminalReady) { resolve(); return; }
if (++attempts >= maxAttempts) {
console.warn('ops-view-logs: terminal ready timeout after 10s');
resolve(); // resolve gracefully to avoid blocking
return;
}
setTimeout(check, 50);
};
check();