Skip to content

Commit

Permalink
fix: error on redundant application disposal
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Dec 9, 2024
1 parent 98fdcce commit 482b8ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export class AppProcess {
}

public async dispose(): Promise<void> {
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()`?',
Expand Down

0 comments on commit 482b8ed

Please sign in to comment.