fix: resolve 14 memory leaks and bugs across native host and extension
CI / Build & Test (push) Successful in 2m47s
CI / Build & Test (push) Successful in 2m47s
Critical: - ssh-manager: release ports/wsServer/holesail on ptySpawn failure - rdp-manager: add 30s timeout to holesailInst.ready() to prevent infinite hang High: - ssh-manager: cancel password-watch timers on PTY exit/error - ssh-manager: cap outputSoFar to 4096 chars to prevent unbounded growth - connect-proxy: add 64KB header buffer cap to prevent OOM Medium: - startup: assign tunnelsRestoredPromise before resolve() to fix race - https-proxy: register upstream error handler before connect callback - connect-proxy: register upstreamSocket error handler before connect callback - https-proxy: destroy socket on backend stream error (was sending truncated 200) - logs: debounce broadcastLogs to prevent IPC storm on every log call Low: - rdp-manager: cap VNC outputBuffer entry count (not just bytes) - https-proxy: track connections in FakeHttpServer.connections Set instead of private _connections API - tab-lifecycle: clean up subscribedTabs/dashboardTabs on tab navigation - dashboard/events: guard setupEvents() against duplicate listener registration
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
// Depends on: all page modules
|
||||
|
||||
function setupEvents() {
|
||||
// Guard against duplicate listener registration if setupEvents() is called
|
||||
// more than once (e.g. after a hot-reload). Without this, anonymous listeners
|
||||
// accumulate and each toggle fires N times per click after N calls.
|
||||
if (document._holesailEventsSetup) return;
|
||||
document._holesailEventsSetup = true;
|
||||
|
||||
// Toggle switches
|
||||
document.querySelectorAll('.toggle').forEach(toggle => {
|
||||
toggle.addEventListener('click', () => toggle.classList.toggle('active'));
|
||||
|
||||
Reference in New Issue
Block a user