Skip to content

Commit 8231923

Browse files
Fix build
1 parent 5126507 commit 8231923

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/snaps-controllers/src/snaps/SnapController.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,9 @@ export class SnapController extends BaseController<
17181718
throw new Error(`The snap "${snapId}" is not running.`);
17191719
}
17201720

1721-
// No-op if the Snap is already stopping.
1721+
// If we are already stopping, wait for that to finish.
17221722
if (runtime.stopPromise) {
1723+
await runtime.stopPromise;
17231724
return;
17241725
}
17251726

@@ -4090,14 +4091,14 @@ export class SnapController extends BaseController<
40904091
this.#snapsRuntimeData.set(snapId, {
40914092
lastRequest: null,
40924093
startPromise: null,
4094+
stopPromise: null,
40934095
installPromise: null,
40944096
encryptionKey: null,
40954097
encryptionSalt: null,
40964098
activeReferences: 0,
40974099
pendingInboundRequests: [],
40984100
pendingOutboundRequests: 0,
40994101
interpreter,
4100-
stopping: false,
41014102
stateMutex: new Mutex(),
41024103
getStateMutex: new Mutex(),
41034104
});

0 commit comments

Comments
 (0)