(port: number, timeoutMs = 2000)
| 81 | } |
| 82 | |
| 83 | async function tcpReachable(port: number, timeoutMs = 2000): Promise<boolean> { |
| 84 | const [v4, v6] = await Promise.all([ |
| 85 | tcpConnect('127.0.0.1', port, timeoutMs), |
| 86 | tcpConnect('::1', port, timeoutMs), |
| 87 | ]); |
| 88 | return v4 || v6; |
| 89 | } |
| 90 | |
| 91 | function readLockPort(): number | null { |
| 92 | if (!existsSync(H.lockPath)) return null; |
no test coverage detected