From cd27de8f11e4866099732cc4ac07cb9f9a3bac7f Mon Sep 17 00:00:00 2001 From: sidelines Date: Wed, 26 Nov 2025 13:39:55 -0500 Subject: [PATCH] Clear device list on disconnect Placed before any networking so that if the server is already disconnected, we still clear the list. Not sure if there's any edge case where it could stay connected after a disconnect() call, but if so, this might need more complicated logic. --- js/src/client/Client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/js/src/client/Client.ts b/js/src/client/Client.ts index bc9c0e0..242eb1e 100644 --- a/js/src/client/Client.ts +++ b/js/src/client/Client.ts @@ -71,6 +71,7 @@ export class ButtplugClient extends EventEmitter { public disconnect = async () => { this._logger.Debug('ButtplugClient: Disconnect called'); + this._devices.clear(); this.checkConnector(); await this.shutdownConnection(); await this._connector!.disconnect();