Skip to content

Commit

Permalink
Disconnect on disposal if using Websockets (#95)
Browse files Browse the repository at this point in the history
* Disconnect on disposal if using Websockets

* Fix getter

* fmt

---------

Co-authored-by: Sean Morrissey <[email protected]>
  • Loading branch information
chaosharmonic and chaosharmonic authored Oct 12, 2024
1 parent 041b9c5 commit 5fafed1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export class Browser {
}

[Symbol.asyncDispose](): Promise<void> {
if (this.isRemoteConnection) return this.disconnect();

return this.close();
}

Expand Down

0 comments on commit 5fafed1

Please sign in to comment.