Skip to content

Commit bceae2d

Browse files
author
Alberto Iannaccone
authored
Merge pull request #25 from arduino/fix-provisioning
fix certificate storing
2 parents f0e109f + a01795b commit bceae2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/boardConfiguration.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default class BoardConfiguration {
117117
const notBefore = new Date(compressedCert.not_before);
118118
const notAfter = new Date(compressedCert.not_after);
119119
// eslint-disable-next-line prefer-template
120-
const answers = board.id + '\n' +
120+
const answers = board.deviceId + '\n' +
121121
notBefore.getUTCFullYear() + '\n' +
122122
(notBefore.getUTCMonth() + 1) + '\n' +
123123
notBefore.getUTCDate() + '\n' +
@@ -220,7 +220,8 @@ export default class BoardConfiguration {
220220
msg: `Couldn't configure board at port ${board.port}. Configuration failed with error: ${reason.message}`,
221221
err: reason.toString()
222222
}))
223-
.finally(() => this.daemon.closeSerialMonitor(board.port, BAUDRATE));
223+
// We are using a timer because we can't close the serial monitor immediately and we have to wait the sketch to finish.
224+
.finally(() => timer(3000).subscribe(() => this.daemon.closeSerialMonitor(board.port, BAUDRATE)));
224225
}, error => {
225226
this.configuring.next({
226227
status: this.CONFIGURE_ERROR,

0 commit comments

Comments
 (0)