-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
-
SerialPort Version: 6.2.0
-
NodeJS Version: N/A
-
Operating System and Hardware Platform: N/A
-
Have you checked the right version of the api docs?: N/A
-
Are you having trouble installing and you checked the Installation Special Cases docs? N/A
-
Are you using Electron and have you checked the Electron Docs?: N/A
I have a device which is only intermittently connected, and requires a specific handshake sequence each time it is connected. The user may disconnect it without warning. Although I now test the isOpen property before every write, there is a race condition where a device disconnect occurs between the property access and the write, which results in the write being buffered. The next time the device is connected, the handshake sequence is not correct, because of the buffered write.
This could be avoided by adding a Serialport constructor option to disable buffering of writes to a closed port.