Skip to content

Commit d5392ad

Browse files
committed
install catch handler for promise in Deferred.
1 parent e8ff8b8 commit d5392ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/app-check/src/proactive-refresh.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export class Refresher {
6464
this.stop();
6565
try {
6666
this.pending = new Deferred();
67+
this.pending.promise.catch(_e => {
68+
/* ignore */
69+
});
6770
await sleep(this.getNextRun(hasSucceeded));
6871

6972
// Why do we resolve a promise, then immediate wait for it?
@@ -74,6 +77,9 @@ export class Refresher {
7477
this.pending.resolve();
7578
await this.pending.promise;
7679
this.pending = new Deferred();
80+
this.pending.promise.catch(_e => {
81+
/* ignore */
82+
});
7783
await this.operation();
7884

7985
this.pending.resolve();

0 commit comments

Comments
 (0)