Skip to content

Commit a0e8075

Browse files
windowsairthegecko
authored andcommitted
fix: Fix delay between each run in waitDelay
1 parent 6a33cc9 commit a0e8075

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dap/adi.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export class ADI implements DAP {
7070
* Continually run a function until it returns true
7171
* @param fn The function to run
7272
* @param timeout Optional timeout to wait before giving up and throwing
73-
* @param timer The milliseconds to wait between each run
73+
* @param delay The milliseconds to wait between each run
7474
* @returns Promise
7575
*/
76-
protected async waitDelay(fn: () => Promise<boolean>, timeout: number = 0, timer: number = DEFAULT_WAIT_DELAY): Promise<void> {
76+
protected async waitDelay(fn: () => Promise<boolean>, timeout: number = 0, delay: number = DEFAULT_WAIT_DELAY): Promise<void> {
7777
let running = true;
7878

7979
if (timeout > 0) {
@@ -92,8 +92,8 @@ export class ADI implements DAP {
9292
return;
9393
}
9494

95-
if (timer > 0) {
96-
await new Promise(resolve => setTimeout(resolve, timeout));
95+
if (delay > 0) {
96+
await new Promise(resolve => setTimeout(resolve, delay));
9797
}
9898
}
9999
}

0 commit comments

Comments
 (0)