Skip to content

Commit a2e4f57

Browse files
author
Alberto Iannaccone
committed
init upload before subscribing
1 parent 9a0f847 commit a2e4f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/boardConfiguration.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export default class BoardConfiguration {
165165
* @param {function} createDeviceCb used to create the device associated to the user
166166
*/
167167
configure(compiledSketch, board, createDeviceCb) {
168+
this.daemon.initUpload();
168169
this.configuring.next({ status: this.CONFIGURE_IN_PROGRESS, msg: 'Uploading provisioning sketch...' });
169170
if (!this.daemon.channelOpen.getValue()) {
170171
const errorMessage = `Couldn't configure board at port ${board.port} because we there is no open channel to the Arduino Create Plugin.`;
@@ -236,7 +237,6 @@ export default class BoardConfiguration {
236237
this.configuring.next({ status: this.CONFIGURE_ERROR, err: `Couldn't configure board at port ${board.port}. Upload failed with error: ${upload.err}` });
237238
});
238239

239-
this.daemon.initUpload();
240240
this.uploadSketch(compiledSketch, board);
241241
}
242242
}

0 commit comments

Comments
 (0)