From 9a979df471917f99f67701e269608532da13c9b8 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Fri, 23 Jan 2026 23:05:22 +1300 Subject: [PATCH] Revert "Fix race condition in WebBleConnection" This reverts commit 78a003767fad213bd3c055ac1563c90294827235. --- src/connection/web_ble_connection.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/connection/web_ble_connection.js b/src/connection/web_ble_connection.js index 1b30cae..dad7c86 100644 --- a/src/connection/web_ble_connection.js +++ b/src/connection/web_ble_connection.js @@ -9,6 +9,7 @@ class WebBleConnection extends Connection { this.gattServer = null; this.rxCharacteristic = null; this.txCharacteristic = null; + this.init(); } static async open() { @@ -35,11 +36,8 @@ class WebBleConnection extends Connection { return null; } - // create connection and initialize it - const connection = new WebBleConnection(device); - await connection.init(); + return new WebBleConnection(device); - return connection; } async init() {