Skip to content

Commit

Permalink
Disconnect on disposal if using Websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosharmonic committed Oct 7, 2024
1 parent 041b9c5 commit 37384f7
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 37384f7

Please sign in to comment.