Skip to content

Commit 15cbb7d

Browse files
author
Stefania
committed
fixed closeAll serial
1 parent 3190c7d commit 15cbb7d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/chrome-app-daemon.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ export default class ChromeOsDaemon extends Daemon {
114114
closeAllPorts() {
115115
const devices = this.devicesList.getValue().serial;
116116
devices.forEach(device => {
117-
this.closeSerialMonitor(device.Name);
117+
this.channel.postMessage({
118+
command: 'closePort',
119+
data: {
120+
name: device.Name
121+
}
122+
});
118123
});
119124
}
120125

src/socket-daemon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default class SocketDaemon extends Daemon {
254254
closeAllPorts() {
255255
const devices = this.devicesList.getValue().serial;
256256
devices.forEach(device => {
257-
this.closeSerialMonitor(device.Name);
257+
this.socket.emit('command', `close ${device.Name}`);
258258
});
259259
}
260260

0 commit comments

Comments
 (0)