mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
Revert "Fix race condition in WebBleConnection"
This reverts commit 78a003767f.
This commit is contained in:
parent
359725a22c
commit
9a979df471
1 changed files with 2 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue