From 2997255c28fb5dadb1d43ae5138cbdb6e1dc7313 Mon Sep 17 00:00:00 2001 From: Sagi Lowenhardt Date: Fri, 16 Jun 2023 19:14:15 +0300 Subject: [PATCH] Close connection on timeout --- pyintesishome/intesisbase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyintesishome/intesisbase.py b/pyintesishome/intesisbase.py index 411ffcd..e58cf5d 100644 --- a/pyintesishome/intesisbase.py +++ b/pyintesishome/intesisbase.py @@ -87,6 +87,7 @@ async def _send_command(self, command: str): ) except asyncio.TimeoutError: print("oops took longer than 5s!") + await self.stop(); except OSError as exc: _LOGGER.error("%s Exception. %s / %s", type(exc), exc.args, exc)