mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 18:27:51 +00:00
Fix lingering timers in bluetooth (part 2) (#91674)
This commit is contained in:
parent
d8c9ed3a64
commit
bb2461ea93
@ -169,3 +169,9 @@ class ActiveBluetoothDataUpdateCoordinator(
|
||||
# possible after a device comes online or back in range, if a poll is due
|
||||
if self.needs_poll(service_info):
|
||||
self.hass.async_create_task(self._debounced_poll.async_call())
|
||||
|
||||
@callback
|
||||
def _async_stop(self) -> None:
|
||||
"""Cancel debouncer and stop the callbacks."""
|
||||
self._debounced_poll.async_cancel()
|
||||
super()._async_stop()
|
||||
|
@ -158,3 +158,9 @@ class ActiveBluetoothProcessorCoordinator(
|
||||
# possible after a device comes online or back in range, if a poll is due
|
||||
if self.needs_poll(service_info):
|
||||
self.hass.async_create_task(self._debounced_poll.async_call())
|
||||
|
||||
@callback
|
||||
def _async_stop(self) -> None:
|
||||
"""Cancel debouncer and stop the callbacks."""
|
||||
self._debounced_poll.async_cancel()
|
||||
super()._async_stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user