This commit is contained in:
Taiki Komoda
2020-05-09 23:15:48 +00:00
parent 7f4b3389d1
commit 4f640989bc

View File

@@ -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));
});
});
}