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

Fix issue#110: Communications go offline and are not restored #149

Closed
wants to merge 3 commits into from

Conversation

Aalawfi
Copy link

@Aalawfi Aalawfi commented Dec 11, 2023

First described in #110, there is case where CP detects a timeout after 200 ms so it resets communication. However, before that PD still send a reply to CP after CP already timeout, this created a problem with sequence mismatch errors.

This PR solves the reported issue by making PD check if it has been more than OSDP_RESP_TOUT_MS before sending a reply. Also, added a unit test for this case.

@sidcha
Copy link
Member

sidcha commented Dec 12, 2023

Thank you for the PR and the testing efforts involved. But this change is only fixing one of the symptoms and not the underlying issue itself.

The issue is this: one side is mistreating a response while the other side thinks it responded within the time frame it's allowed to respond. To fix this, we need to make packet handling more robust on either side and then expect them to play nice when they come together.

I'm aware of this issue (and it's been on my TODO list for a while) and currently not looking at it because it's not causing any immediate problem. For the time being, I'm spending all the time I have assigned to this project in the rust language support; but if you think issue is blocking, I can take a look at it sooner.

@sidcha
Copy link
Member

sidcha commented Dec 12, 2023

Closing this PR for now.

@sidcha sidcha closed this Dec 12, 2023
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.

2 participants