Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Jun 2, 2021
commit fc264dfd8d3e9c8d2aabf932369a80b5de69ca26
5 changes: 3 additions & 2 deletions lib/internal/inspector/_inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ async function portIsFree(host, port, timeout = 9999) {

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

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