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

RFC2217 improvements #1341

Merged
merged 1 commit into from
Jun 1, 2020
Merged

Conversation

bodiroga
Copy link
Contributor

  • Rework workaround so binding can use undiscovered RFC2217 ports
  • Catch UnsupportedCommOperationException
  • Improve RFC2217 reconnection logic

Signed-off-by: Aitor Iturrioz riturrioz@gmail.com
Also-by: Wouter Born github@maindrain.net

* Rework workaround so binding can use undiscovered RFC2217 ports
* Catch UnsupportedCommOperationException
* Improve RFC2217 reconnection logic

Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Also-by: Wouter Born <github@maindrain.net>
@bodiroga
Copy link
Contributor Author

@wborn, please, confirm that you agree with what I have done. I have squashed all commits in a single one, but left your original commit message and add my changes at the end. If there is anything wrong, tell it to me and I will make the required changes as soon as possible 😉

Some notes:

  • When a RFC2218 connection is in use, the enableReceiveTimeout function does not complete, and as a consequence, the read() function is synchronous. In this case, a -1 value means that the connection with the RFC2217 server is closed, so we stop the ZWaveReceiveThread thread and call the onSerialPortError function.
  • I have also removed some "updateStatus" calls, as I have realized that they were not necessary.

Great team work! 👍

@bodiroga bodiroga mentioned this pull request May 31, 2020
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me! Checking the -1 values will also be useful for other connection types that don't support receive timeouts.

@cdjackson
Copy link
Collaborator

Thanks guys.

@cdjackson cdjackson merged commit 59698f5 into openhab:2.5.x Jun 1, 2020
@bodiroga bodiroga deleted the rfc2217-improvements-2 branch June 18, 2020 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants