Skip to content

Commit

Permalink
fix(packages/shared/src/utils/polling-control-center.ts): fix timeout…
Browse files Browse the repository at this point in the history
… not add initialTime
  • Loading branch information
沈昶 committed Jun 13, 2024
1 parent 4743e21 commit b5eec85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/shared/src/utils/polling-control-center.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export class PollingControlCenter {
queueItem.initialTime = Date.now();
queueItem.timeToBeExecuted = queueItem.initialTime + queueItem.interval;

if (queueItem.timeout) {
queueItem.timeout += queueItem.initialTime;
}

if (this.options.autorun) {
this.run();
}
Expand Down

0 comments on commit b5eec85

Please sign in to comment.