Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing a SerialPort causes an IOException to be thrown #3

Closed
rm5248 opened this issue Feb 13, 2016 · 1 comment

Comments

@rm5248
Copy link
Owner

commented Feb 13, 2016

When closing a SerialPort, the thread that is currently reading the port will come back with an IOException. This occurs at least on Windows using a BufferedSerialInputStream, but not using a SimpleSerialInputStream.

Also, when closing a serialport that is using a SimpleSerialInputStream, a 0 gets returned when the serial port closes - it should be -1, as that is what an InputStream uses to say that there is an EOF.

@rm5248 rm5248 referenced this issue Feb 14, 2016
rm5248 added a commit that referenced this issue Feb 15, 2016
Updated BufferedSerialInputStream to optionally throw an IOException
when an InterruptedException is thrown.  Added a function on the
SerialPort to set this functionality.  Fixed the inputstream returning 0
when the serial port is closed(at least on Windows), will now return -1.
Needs to be tested on Linux.  POM should no longer try to sign by
default, only when we release.
rm5248 added a commit that referenced this issue Feb 22, 2016
…ative code to return -1 on EOF on *nix systems. still needs some testing, but it should be good.
@rm5248

This comment has been minimized.

Copy link
Owner Author

commented Mar 5, 2016

Should be fixed with 0.7.

@rm5248 rm5248 closed this Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.