1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00

Fix bluetooth active update coordinator not returning on failure (#79167)

We also need to return on polling exception so we do not
try to update.

Fixes #79166
This commit is contained in:
J. Nick Koston 2022-09-27 16:51:46 -10:00 committed by GitHub
parent 40f5c317c7
commit 7b708f4b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,12 +117,12 @@ class ActiveBluetoothProcessorCoordinator(
"%s: Bluetooth error whilst polling: %s", self.address, str(exc)
)
self.last_poll_successful = False
return
return
except Exception: # pylint: disable=broad-except
if self.last_poll_successful:
self.logger.exception("%s: Failure while polling", self.address)
self.last_poll_successful = False
return
return
finally:
self._last_poll = time.monotonic()