mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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: https://github.com/nodejs/node/pull/38847 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
5d9fd768f0
commit
fc264dfd8d
1 file changed
+3
-2
@@ -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`);
|
||||
|
||||
Reference in new issue
Block a user