From 8c7c7c152a0fe493589de0d14fc12803aa4efe2f Mon Sep 17 00:00:00 2001 From: JovannMC Date: Sun, 21 Apr 2024 21:25:51 +0300 Subject: [PATCH] fix duplicate device connections --- src/mode/bluetooth.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mode/bluetooth.ts b/src/mode/bluetooth.ts index 7846684..4529cc1 100644 --- a/src/mode/bluetooth.ts +++ b/src/mode/bluetooth.ts @@ -97,6 +97,8 @@ export default class Bluetooth extends EventEmitter { "HaritoraX (1.0/1.1/1.1b) detected. Device is not fully supported and you may experience issues." ); + activeDevices.push([localName, peripheral, [], []]); + peripheral.connect((err: any) => { if (err) { error(`Error connecting to ${localName}: ${err}`);