Skip to content

Commit eb7c932

Browse files
Trottdanielleadams
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 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 47ad448 commit eb7c932

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/inspector/_inspect.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ async function portIsFree(host, port, timeout = 9999) {
8787

8888
setTimeout(timeout).then(() => ac.abort());
8989

90-
// eslint-disable-next-line no-unused-vars
91-
for await (const _ of setInterval(retryDelay)) {
90+
const asyncIterator = setInterval(retryDelay);
91+
while (true) {
92+
await asyncIterator.next();
9293
if (signal.aborted) {
9394
throw new StartupError(
9495
`Timeout (${timeout}) waiting for ${host}:${port} to be free`);

0 commit comments

Comments
 (0)