From 375e159c39b91278f6c6fa69fb811ecefa77459c Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 26 Aug 2024 15:21:26 +0800 Subject: [PATCH] Get rid of timeout on readline --- pytec/pytec/aioclient.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pytec/pytec/aioclient.py b/pytec/pytec/aioclient.py index 726fabb..eb5b9bc 100644 --- a/pytec/pytec/aioclient.py +++ b/pytec/pytec/aioclient.py @@ -13,7 +13,6 @@ class AsyncioClient: self._writer = None self._command_lock = asyncio.Lock() self._report_mode_on = False - self.timeout = None async def connect(self, host="192.168.1.26", port=23): """Connect to Thermostat at specified host and port. @@ -54,9 +53,7 @@ class AsyncioClient: async def _read_line(self): # read 1 line - chunk = await asyncio.wait_for( - self._reader.readline(), self.timeout - ) # Only wait for response until timeout + chunk = await self._reader.readline() return chunk.decode("utf-8", errors="ignore") async def _read_write(self, command):