mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01: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 Backport-PR-URL: https://github.com/nodejs/node/pull/39446 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
79bfb0416b
commit
0ef5e088c0
|
|
@ -91,8 +91,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`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user