Skip to content

Commit 3a69dba

Browse files
committed
Fix async error handling and timing issues
1 parent 1ae342a commit 3a69dba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/js/protocols/WebBluetooth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,9 @@ class WebBluetooth extends EventTarget {
363363
await this.lastWrite;
364364
}
365365
this.lastWrite = this.writeCharacteristic.writeValue(dataBuffer);
366+
await this.lastWrite;
366367
this.bytesSent += data.byteLength;
367-
368+
368369
if (cb) {
369370
cb({
370371
error: null,

0 commit comments

Comments
 (0)