@@ -34,6 +34,7 @@ export class MonitorManager extends CoreClientAware {
34
34
} ;
35
35
36
36
private startMonitor_PendingRequests : {
37
+ monitorID : string ;
37
38
requestFor : [ Board , Port ] ;
38
39
postStartCallback : ( status : Status ) => void ;
39
40
} [ ] = [ ] ;
@@ -107,10 +108,17 @@ export class MonitorManager extends CoreClientAware {
107
108
}
108
109
109
110
if ( this . uploadIsInProgress ( ) ) {
111
+ this . startMonitor_PendingRequests =
112
+ this . startMonitor_PendingRequests . filter (
113
+ ( request ) => request . monitorID !== monitorID
114
+ ) ;
115
+
110
116
this . startMonitor_PendingRequests . push ( {
117
+ monitorID,
111
118
requestFor : [ board , port ] ,
112
119
postStartCallback,
113
120
} ) ;
121
+
114
122
return ;
115
123
}
116
124
@@ -229,7 +237,8 @@ export class MonitorManager extends CoreClientAware {
229
237
this . startMonitor_PendingRequests = [ ] ;
230
238
231
239
for ( const {
232
- requestFor : [ board , port ] ,
240
+ monitorID,
241
+ requestFor : [ _ , port ] ,
233
242
postStartCallback : onFinish ,
234
243
} of queued ) {
235
244
const boardsState = await this . boardsService . getState ( ) ;
@@ -241,7 +250,6 @@ export class MonitorManager extends CoreClientAware {
241
250
. some ( ( portAddress : string ) => port . address === portAddress ) ;
242
251
243
252
if ( boardIsStillOnPort ) {
244
- const monitorID = this . monitorID ( board , port ) ;
245
253
const monitorService = this . monitorServices . get ( monitorID ) ;
246
254
247
255
if ( monitorService ) {
0 commit comments