Autodrop3d / serialTerminal.com

A browser based serial terminal. No plugins. Vanilla javascript.
https://www.serialterminal.com
ISC License
200 stars 46 forks source link

Port Close Logic. #12

Open ezazpi opened 2 years ago

ezazpi commented 2 years ago

In the source, I see you keep a reference to the writableStreamClosed promise. However, you don't await this promise nor is there any logic to close the writer, reader, and port. I also saw the reader.releaseLock line commented (I don't recall if there was a writer.releaseLock). Maybe there can be a Close button to exercise this logic, which would allow the user to reuse the serial port without necessarily having to close the browser tab?

mmiscool commented 2 years ago

Hitting the refresh button when you want to connect to a new device is a problem?