Skip to content

Commit ccebbf2

Browse files
committed
before_connect 상태에서 flash 시 firmwarecheck 로직과 충돌 수정
- flashFirmware 가 기존 serialPort 를 닫고 지워서 에러가 발생
1 parent 828dee8 commit ccebbf2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/src/main/connector.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ class Connector {
127127
if (control) {
128128
if (firmwarecheck) {
129129
this.flashFirmware = setTimeout(() => {
130-
this.serialPort.parser ?
131-
this.serialPort.parser.removeAllListeners('data') :
132-
this.serialPort.removeAllListeners('data');
133-
this.executeFlash = true;
130+
if (this.serialPort) {
131+
this.serialPort.parser ?
132+
this.serialPort.parser.removeAllListeners('data') :
133+
this.serialPort.removeAllListeners('data');
134+
this.executeFlash = true;
135+
}
134136
resolve();
135137
}, 3000);
136138
}

0 commit comments

Comments
 (0)