Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76d46d4

Browse filesBrowse files
author
Akos Kitta
committed
fix: close monitor if port changed during upload
the client will automatically request a new monitor with the new port
1 parent 97f1801 commit 76d46d4
Copy full SHA for 76d46d4

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎arduino-ide-extension/src/node/monitor-manager.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/node/monitor-manager.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
PluggableMonitorSettings,
99
Port,
1010
PortIdentifier,
11+
portIdentifierEquals,
1112
} from '../common/protocol';
1213
import { CoreClientAware } from './core-client-provider';
1314
import { MonitorService } from './monitor-service';
@@ -214,7 +215,11 @@ export class MonitorManager extends CoreClientAware {
214215

215216
const monitor = this.monitorServices.get(beforeMonitorID);
216217
if (monitor) {
217-
await monitor.start();
218+
if (portIdentifierEquals(beforePort, afterPort)) {
219+
await monitor.start();
220+
} else {
221+
await monitor.stop();
222+
}
218223
}
219224

220225
// this monitorID will only be present in "disposedForUpload"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.