MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / safeCloseServer

Function safeCloseServer

tests/e2e/helpers/app-launcher.js:22–29  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

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

Callers 2

releaseReservationFunction · 0.85

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected