Skip to content

Commit

Permalink
Fix clear timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
maxima-net committed Sep 6, 2022
1 parent 21efdb8 commit 12c2b05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/timeoutScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export class TimeoutScheduler implements Disposable {

async dispose(): Promise<void> {
if (this.counterExpirationWatcherId)
clearInterval(this.counterExpirationWatcherId);
clearTimeout(this.counterExpirationWatcherId);

if (this.actionWatcherId)
clearInterval(this.actionWatcherId);
clearTimeout(this.actionWatcherId);
}

setTimeout(action: () => void) {
Expand All @@ -43,7 +43,7 @@ export class TimeoutScheduler implements Disposable {

private resetCounterExpiration() {
if (this.counterExpirationWatcherId)
clearInterval(this.counterExpirationWatcherId);
clearTimeout(this.counterExpirationWatcherId);

this.counterExpirationWatcherId = setTimeout(() => {
this.resetCounter();
Expand Down

0 comments on commit 12c2b05

Please sign in to comment.