8000 Remove event handlers on connection close · arduino/lab-micropython-editor@4248c1e · GitHub
[go: up one dir, main page]

Skip to content

Commit 4248c1e

Browse files
committed
Remove event handlers on connection close
1 parent 612d0b9 commit 4248c1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/serial/serial.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class Serial {
5656
})
5757

5858
this.board.serial.on('close', () => {
59+
this.board.serial.removeAllListeners("data")
60+
this.board.serial.removeAllListeners("close")
5961
this.win.webContents.send('serial-on-connection-closed')
6062
})
6163
}

0 commit comments

Comments
 (0)
0