mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix missing ONVIF events when switching from PullPoint to webhooks (#92627)
We now let the PullPoint subscription expire instead of explicitly unsubscribing when pausing the subscription. We will still unsubscribe it if Home Assistant is shutdown or the integration is reloaded Some cameras will cancel ALL subscriptions when we do an unsubscribe so we want to let the PullPoint subscription expire instead of explicitly cancelling it.
This commit is contained in:
parent
c8c1466c06
commit
bcbc8539a6
@ -289,7 +289,13 @@ class PullPointManager:
|
||||
"""Pause pullpoint subscription."""
|
||||
LOGGER.debug("%s: Pausing PullPoint manager", self._name)
|
||||
self.state = PullPointManagerState.PAUSED
|
||||
self._hass.async_create_task(self._async_cancel_and_unsubscribe())
|
||||
# Cancel the renew job so we don't renew the subscription
|
||||
# and stop pulling messages.
|
||||
self._async_cancel_pullpoint_renew()
|
||||
self.async_cancel_pull_messages()
|
||||
# We do not unsubscribe from the pullpoint subscription and instead
|
||||
# let the subscription expire since some cameras will terminate all
|
||||
# subscriptions if we unsubscribe which will break the webhook.
|
||||
|
||||
@callback
|
||||
def async_resume(self) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user