(server)
| 20 | const DEFAULT_FORCE_KILL_TIMEOUT_MS = 5000 |
| 21 | |
| 22 | function safeCloseServer(server) { |
| 23 | if (!server) return |
| 24 | try { |
| 25 | server.close() |
| 26 | } catch { |
| 27 | // ignore close errors for probing server |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | async function findAvailablePortWithReservation( |
| 32 | startPort = DEFAULT_START_PORT, |
no test coverage detected