adds retry when pull subscriptions fails #319
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I am running https://shinobi.video/ which uses this library and have noticed that sometimes the ONVIF events don't get triggered. I narrowed this down to when there is a connection disruption e.g. my router updates or the camera is restarted.
This Pull Requests adds a retry mechanism if the connection fails. I have added a configurable wait time and used that as a kind of feature flag so this change is more backwards compatible.
I struggled to write tests for this due to the timeout and I think the mock server being in an external process. If someone could guide me the best way to test this I would be happy to write some tests.
I have tested this locally adding a listener, restarting my camera and then seeing if events continue to flow