From 5fafed16a632d6086015062a47069391719a709d Mon Sep 17 00:00:00 2001 From: Sean Morrissey Date: Sat, 12 Oct 2024 10:43:46 -0400 Subject: [PATCH] Disconnect on disposal if using Websockets (#95) * Disconnect on disposal if using Websockets * Fix getter * fmt --------- Co-authored-by: Sean Morrissey --- src/browser.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser.ts b/src/browser.ts index de2fd51..8f68c68 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -101,6 +101,8 @@ export class Browser { } [Symbol.asyncDispose](): Promise { + if (this.isRemoteConnection) return this.disconnect(); + return this.close(); }