Skip to content

Commit aa15223

Browse files
committed
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.
1 parent 4c508f5 commit aa15223

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/internal/inspector/_inspect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ 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 (await asyncIterator.next()) {
9292
if (signal.aborted) {
9393
throw new StartupError(
9494
`Timeout (${timeout}) waiting for ${host}:${port} to be free`);

0 commit comments

Comments
 (0)