Skip to content

Commit 0ef5e08

Browse files
Trottrichardlau
authored andcommitted
debugger: revise async iterator usage to comply with lint rules
I'm not sure that this is any clearer than the existing code, but I don't think it's significantly less clear, and it avoids comment disabling a lint rule. PR-URL: #38847 Backport-PR-URL: #39446 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 79bfb04 commit 0ef5e08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/inspector/_inspect.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ async function portIsFree(host, port, timeout = 9999) {
9191

9292
setTimeout(timeout).then(() => ac.abort());
9393

94-
// eslint-disable-next-line no-unused-vars
95-
for await (const _ of setInterval(retryDelay)) {
94+
const asyncIterator = setInterval(retryDelay);
95+
while (true) {
96+
await asyncIterator.next();
9697
if (signal.aborted) {
9798
throw new StartupError(
9899
`Timeout (${timeout}) waiting for ${host}:${port} to be free`);

0 commit comments

Comments
 (0)