Revert "Fix race condition in WebBleConnection"

This reverts commit 78a003767f.
This commit is contained in:
liamcottle 2026-01-23 23:05:22 +13:00
parent 359725a22c
commit 9a979df471

View file

@ -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() {