Skip to content

Commit

Permalink
Fix mv3 handle online resources issue
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed May 23, 2024
1 parent 5153424 commit 11e341e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/extension-base/src/koni/background/handlers/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ export default class KoniState {
this.waitSleeping = null;
}

private async _start (isWakeup = false) {
private async _start () {
// Wait sleep finish before start to avoid conflict
this.generalStatus === ServiceStatus.STOPPING && this.waitSleeping && await this.waitSleeping;

Expand All @@ -1791,6 +1791,7 @@ export default class KoniState {
return;
}

const isWakeup = this.generalStatus === ServiceStatus.STOPPED;
const starting = createPromiseHandler<void>();

this.generalStatus = ServiceStatus.STARTING;
Expand All @@ -1812,7 +1813,7 @@ export default class KoniState {
}

public async wakeup () {
await this._start(true);
await this._start();
}

public cancelSubscription (id: string): boolean {
Expand Down

0 comments on commit 11e341e

Please sign in to comment.