We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97f1801 commit 76d46d4Copy full SHA for 76d46d4
arduino-ide-extension/src/node/monitor-manager.ts
@@ -8,6 +8,7 @@ import {
8
PluggableMonitorSettings,
9
Port,
10
PortIdentifier,
11
+ portIdentifierEquals,
12
} from '../common/protocol';
13
import { CoreClientAware } from './core-client-provider';
14
import { MonitorService } from './monitor-service';
@@ -214,7 +215,11 @@ export class MonitorManager extends CoreClientAware {
214
215
216
const monitor = this.monitorServices.get(beforeMonitorID);
217
if (monitor) {
- await monitor.start();
218
+ if (portIdentifierEquals(beforePort, afterPort)) {
219
+ await monitor.start();
220
+ } else {
221
+ await monitor.stop();
222
+ }
223
}
224
225
// this monitorID will only be present in "disposedForUpload"
0 commit comments