diff --git a/src/app-process.ts b/src/app-process.ts index bedf4ff..8796a59 100644 --- a/src/app-process.ts +++ b/src/app-process.ts @@ -48,6 +48,11 @@ export class AppProcess { } public async dispose(): Promise { + invariant( + !this.controller.signal.aborted, + 'Failed to dispose of a launched application: already disposed', + ) + invariant( this.io != null, 'Failed to dispose of a launched application: application is not running. Did you forget to run `await launcher.run()`?',