Fix DSMR reconnecting loop without timeout (#53722)

This commit is contained in:
Franck Nijhof 2021-07-29 22:55:26 +02:00 committed by GitHub
parent 2d83ad3211
commit 390101720d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,6 +165,9 @@ async def async_setup_entry(
LOGGER.exception("Error connecting to DSMR")
transport = None
protocol = None
# throttle reconnect attempts
await asyncio.sleep(entry.data[CONF_RECONNECT_INTERVAL])
except CancelledError:
if stop_listener:
stop_listener() # pylint: disable=not-callable