diff --git a/lib/internal/inspector/_inspect.js b/lib/internal/inspector/_inspect.js index 29dc8601d11b37..427469b4a6f116 100644 --- a/lib/internal/inspector/_inspect.js +++ b/lib/internal/inspector/_inspect.js @@ -88,7 +88,8 @@ async function portIsFree(host, port, timeout = 9999) { setTimeout(timeout).then(() => ac.abort()); const asyncIterator = setInterval(retryDelay); - while (await asyncIterator.next()) { + while (true) { + await asyncIterator.next(); if (signal.aborted) { throw new StartupError( `Timeout (${timeout}) waiting for ${host}:${port} to be free`);