mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2026-05-09 16:54:07 +08:00
Fix #38 issue
This commit is contained in:
@@ -294,7 +294,14 @@ export class SecureDfu extends EventDispatcher {
|
||||
reject: reject
|
||||
};
|
||||
|
||||
characteristic.writeValue(value);
|
||||
characteristic.writeValue(value)
|
||||
.catch(e => {
|
||||
this.log(e);
|
||||
return Promise.resolve()
|
||||
.then(() => this.delayPromise(500))
|
||||
// Retry once
|
||||
.then(() => characteristic.writeValue(value));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user