mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 12:55:16 -07:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user