Fix DNS2 self-updater path and sync live dashboard version UI

This commit is contained in:
Krystie
2026-05-05 17:26:42 -07:00
parent f5fe32b999
commit 95b137bf17
5 changed files with 20 additions and 10 deletions

View File

@@ -55,7 +55,9 @@ async function handleExec(ws, containerId, log) {
if (chunks.length > 0 && Buffer.concat(chunks).toString().includes('/bash')) {
shell = '/bin/bash';
}
} catch (_) {}
} catch (_) {
// Fall back to /bin/sh when bash detection fails
}
execInstance = await container.exec({
Cmd: [shell],
@@ -96,21 +98,27 @@ async function handleExec(ws, containerId, log) {
return;
}
}
} catch (_) {}
} catch (_) {
// Treat message as raw terminal input if JSON parsing fails
}
// Regular terminal input
execStream.write(data);
});
ws.on('close', () => {
if (execStream) {
try { execStream.destroy(); } catch (_) {}
try { execStream.destroy(); } catch (_) {
// Ignore stream teardown errors on socket close
}
}
});
ws.on('error', (err) => {
log.warn('exec', 'WebSocket error', { containerId, error: err.message });
if (execStream) {
try { execStream.destroy(); } catch (_) {}
try { execStream.destroy(); } catch (_) {
// Ignore stream teardown errors after websocket errors
}
}
});