Skip to content

Commit 98404ba

Browse files
committed
open event fix
1 parent e2fcc2b commit 98404ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/serial.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ To add a new serial device, you must add an object to
167167
this.hadData = false;
168168
this.flowControlWait = 0;
169169
this.rxDataHandlerLastCh = 0;
170-
if (this.isOpen) {
171-
this.isOpen = false;
170+
if (!this.isOpen) {
171+
this.isOpen = true;
172172
this.emit("open");
173173
}
174174
// if we had any writes queued, do them now

0 commit comments

Comments
 (0)