Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static waitForPortOpen(
port, host = TcpPortScanner.DefaultHost, checkLocalHostAliaes = true,
retryTimeMs = 100, timeOutMs = 5000): Promise {
retryTimeMs = Math.max(retryTimeMs, 1);
if (!TcpPortScanner.shouldUseServerMethod(host)) {
return tcpPortUsed.waitUntilUsedOnHost(port, host, retryTimeMs, timeOutMs);
} else {
const opts = new PortStatusArgs(true, port, host, checkLocalHostAliaes, retryTimeMs, timeOutMs);
return TcpPortScanner.waitForPortStatusEx(opts);
}
}