(obj: JsonRpc | string)
| 238 | }; |
| 239 | |
| 240 | const writeClient = (obj: JsonRpc | string): void => { |
| 241 | try { process.stdout.write((typeof obj === 'string' ? obj : JSON.stringify(obj)) + '\n'); } catch { /* host gone */ } |
| 242 | }; |
| 243 | const shutdown = (): void => { |
| 244 | if (shuttingDown) return; shuttingDown = true; |
| 245 | try { daemonSocket?.destroy(); } catch { /* ignore */ } |
no test coverage detected