(
peers: { pid: number | null; hostPid: number | null },
isAlive: (pid: number) => boolean,
)
| 1106 | * basis — those clients rely on the socket-close path. Exported for testing. |
| 1107 | */ |
| 1108 | export function peerIsDead( |
| 1109 | peers: { pid: number | null; hostPid: number | null }, |
| 1110 | isAlive: (pid: number) => boolean, |
| 1111 | ): boolean { |
| 1112 | if (peers.pid === null) return false; |
| 1113 | if (!isAlive(peers.pid)) return true; |
| 1114 | if (peers.hostPid !== null && !isAlive(peers.hostPid)) return true; |
| 1115 | return false; |
| 1116 | } |
| 1117 | |
| 1118 | /** |
| 1119 | * Read the optional client-hello line a proxy sends after the daemon hello. |
no test coverage detected