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

PD offline is a little aggressive #140

Closed
rm5248 opened this issue Oct 23, 2023 · 1 comment
Closed

PD offline is a little aggressive #140

rm5248 opened this issue Oct 23, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@rm5248
Copy link

rm5248 commented Oct 23, 2023

Describe the bug
With the fix for #133, we are occasionally getting an indication on the PD side that the connection has dropped, when our CP side is not detecting a drop.

The default timeout is set to 200ms here. The 200ms is how long a single PD needs to respond within. Several options to fix:

  1. Increase the delay to at least 600ms. Note that in the OSDP spec version 2.2 and 2.1.7, the "off-line" time is set to 8 seconds, so that is probably the correct time to set it to.
  2. Add an option to make this configurable on the PD side(e.g. osdp_pd_set_max_offline_time)
@sidcha sidcha self-assigned this Oct 24, 2023
@sidcha sidcha added the Bug Something isn't working label Oct 24, 2023
@sidcha
Copy link
Member

sidcha commented Dec 9, 2023

@rm5248, thanks for reporting this. I have added a new macro OSDP_ONLINE_TOUT_MS defined to 600 ms. 8 seconds seem too high a number for my preference :).

@sidcha sidcha closed this as completed in 068bf59 Dec 9, 2023
sidcha added a commit that referenced this issue Dec 9, 2023
The current defintion of 200ms seem to be too agressive for some use
cases.

Fixes: #140
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
(cherry picked from commit 068bf59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants