From edfcb25bdc6447d6ef3dc44197a99dba1abd6673 Mon Sep 17 00:00:00 2001 From: AAlmarwani93 <76117141+AAlmarwani93@users.noreply.github.com> Date: Thu, 3 Aug 2023 03:05:40 +0300 Subject: [PATCH] # need to close the connection as device not responding due to hung state (#48) --- pyintesishome/intesisbase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyintesishome/intesisbase.py b/pyintesishome/intesisbase.py index 411ffcd..901a17a 100644 --- a/pyintesishome/intesisbase.py +++ b/pyintesishome/intesisbase.py @@ -87,6 +87,8 @@ async def _send_command(self, command: str): ) except asyncio.TimeoutError: print("oops took longer than 5s!") + # need to close the connection as device not responding due to hung state + self._writer.write.close() except OSError as exc: _LOGGER.error("%s Exception. %s / %s", type(exc), exc.args, exc)