(
peers: { pid: number | null; hostPid: number | null },
isAlive: (pid: number) => boolean,
)
| 772 | * basis — those clients rely on the socket-close path. Exported for testing. |
| 773 | */ |
| 774 | export function peerIsDead( |
| 775 | peers: { pid: number | null; hostPid: number | null }, |
| 776 | isAlive: (pid: number) => boolean, |
| 777 | ): boolean { |
| 778 | if (peers.pid === null) return false; |
| 779 | if (!isAlive(peers.pid)) return true; |
| 780 | if (peers.hostPid !== null && !isAlive(peers.hostPid)) return true; |
| 781 | return false; |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Read the optional client-hello line a proxy sends after the daemon hello. |
no test coverage detected