handle cancellation

This commit is contained in:
J. Nick Koston 2024-01-12 16:06:34 -10:00
parent e0c614cf62
commit 8868c9b70d
No known key found for this signature in database

View File

@ -165,6 +165,7 @@ class TPLinkSmartHomeProtocol:
self.host,
ex,
)
raise
try:
assert self.reader is not None # noqa: S101
@ -188,6 +189,7 @@ class TPLinkSmartHomeProtocol:
_LOGGER.debug(
"BaseException during query, closing connection: %s", self.host, ex
)
raise
# make mypy happy, this should never be reached..
await self.close()