Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb7c932

Browse filesBrowse 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 <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 47ad448 commit eb7c932
Copy full SHA for eb7c932

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎lib/internal/inspector/_inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/_inspect.js
+3-2Lines changed: 3 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.