Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(agent): close agent if fails to open
Browse files Browse the repository at this point in the history
  • Loading branch information
blakebyrnes committed Feb 21, 2024
1 parent bcc0573 commit 797731c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agent/main/lib/Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default class Agent extends TypedEventEmitter<{ close: void }> {

return await this.createBrowserContext(browser);
} catch (err) {
await this.close();
this.isOpen.reject(err);
} finally {
this.isOpen.resolve(this.browserContext);
Expand Down

0 comments on commit 797731c

Please sign in to comment.