MCPcopy Create free account
hub / github.com/Marus/cortex-debug / waitForPortClosed

Method waitForPortClosed

src/tcpportscanner.ts:373–379  ·  view source on GitHub ↗

* Wait for port to close. We always do a minium of one try regardless of timeouts, so setting a timeout * of 0 means only one try * * @return a promise. On failure, the error is Error('timeout') for a true timeout or something else * for other failures

(
        port, host = TcpPortScanner.DefaultHost, checkLocalHostAliaes = true,
        retryTimeMs = 100, timeOutMs = 5000)

Source from the content-addressed store, hash-verified

371 * for other failures
372 */
373 public static waitForPortClosed(
374 port, host = TcpPortScanner.DefaultHost, checkLocalHostAliaes = true,
375 retryTimeMs = 100, timeOutMs = 5000): Promise<void> {
376 retryTimeMs = Math.max(retryTimeMs, 1);
377 const opts = new PortStatusArgs(false, port, host, checkLocalHostAliaes, retryTimeMs, timeOutMs);
378 return TcpPortScanner.waitForPortStatusEx(opts);
379 }
380
381 // we cache only ipv4 address and the default ipv6 address for the localhost. All ipv6 aliases
382 // seem to be true aliases on all systems but ipv4 aliases may or may not be.

Callers 1

Calls 1

waitForPortStatusExMethod · 0.45

Tested by

no test coverage detected