()
| 425 | } |
| 426 | |
| 427 | private handleSocketClose(): void { |
| 428 | if (this.stopped) return; |
| 429 | this.stopped = true; |
| 430 | this.rejectPending('Socket closed'); |
| 431 | for (const h of this.closeHandlers) { |
| 432 | try { h(); } catch { /* never let a close-handler take the daemon down */ } |
| 433 | } |
| 434 | this.closeHandlers = []; |
| 435 | } |
| 436 | } |