thread launcher config dir through app control and overlay calls

- startOverlay and isRunningAppControlServerAvailable accept explicit configDir to avoid re-resolving from env mid-flight
- emit connection-change on reconnect when previously connected
- handle errored client sockets in app control server with logWarn and destroy
This commit is contained in:
2026-05-21 03:49:15 -07:00
parent 661e54144d
commit fed1bd3b42
9 changed files with 248 additions and 17 deletions
+7
View File
@@ -47,6 +47,13 @@ export function startAppControlServer(options: AppControlServerOptions): AppCont
let byteCount = 0;
let handled = false;
socket.on('error', (error) => {
if (handled) return;
handled = true;
options.logWarn?.('App control client socket error.', error);
socket.destroy();
});
socket.on('data', (chunk) => {
if (handled) return;
byteCount += chunk.length;