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

me.legrange.swap.tcp.TcpTransport.Reader.run should detect socket disconnects better #21

Open
MBradbury opened this issue May 2, 2016 · 0 comments
Labels

Comments

@MBradbury
Copy link

While having the panstamp-tools gui attached to the debug port of my OpenHab instance with the panstamp binding running, if I kill the gui tool without cleanly disconnecting then OpenHab goes into an infinite loop logging the following error message:

2016-05-02 08:30:18.159 [ERROR] [legrange.swap.tcp.TcpTransport] - null
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:154) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_65]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[na:1.8.0_65]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[na:1.8.0_65]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[na:1.8.0_65]
at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[na:1.8.0_65]
at java.io.BufferedReader.fill(BufferedReader.java:161) ~[na:1.8.0_65]
at java.io.BufferedReader.readLine(BufferedReader.java:324) ~[na:1.8.0_65]
at java.io.BufferedReader.readLine(BufferedReader.java:389) ~[na:1.8.0_65]
at me.legrange.swap.tcp.TcpTransport$Reader.run(TcpTransport.java:192) ~[na:na]

me.legrange.swap.tcp.TcpTransport.Reader.run should detect that the socket has been forcibly closed from other other end, log a message once and then stop looping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants