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 waitForPortStatus(
port, host = TcpPortScanner.DefaultHost, inUse = true,
checkLocalHostAliaes = true, retryTimeMs = 100, timeOutMs = 5000): Promise {
retryTimeMs = Math.max(retryTimeMs, 1);
if (!TcpPortScanner.shouldUseServerMethod(host)) {
return tcpPortUsed.waitForStatus(port, host, inUse, retryTimeMs, timeOutMs);
} else {
const opts = new PortStatusArgs(inUse, port, host, checkLocalHostAliaes, retryTimeMs, timeOutMs);
return TcpPortScanner.waitForPortStatusEx(opts);
}
}