mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-12 20:18:13 +08:00
No need to disconnect from DFU Target after DFU update. Link will be lost when target is reset and disconnect handler will be called.
This commit is contained in:
6
dist/dfu.js
vendored
6
dist/dfu.js
vendored
@@ -396,11 +396,7 @@
|
||||
*/
|
||||
controlChar.writeValue(new Uint8Array([5]))
|
||||
.then(() => {
|
||||
// Hack to gracefully disconnect without disconnect event
|
||||
setTimeout(() => {
|
||||
chars.server.disconnect();
|
||||
resolve();
|
||||
}, 3000);
|
||||
log('image activated and dfu target reset');
|
||||
})
|
||||
.catch(error => {
|
||||
error = "error resetting: " + error;
|
||||
|
||||
Reference in New Issue
Block a user