timeout handler removed again, as it has no positive effect

This commit is contained in:
Stefan Allius
2024-05-15 23:15:20 +02:00
parent fb5c6a74cf
commit 841877305d
2 changed files with 1 additions and 12 deletions

View File

@@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- build version string in the same format as TSUN for GEN3 invterts - build version string in the same format as TSUN for GEN3 invterts
- add graceful shutdown - add graceful shutdown
- add timeout monitoring for received packets
- parse Modbus values and store them in the database - parse Modbus values and store them in the database
- add cron task to request the output power every minute - add cron task to request the output power every minute
- GEN3PLUS: add MQTT topics to send AT commands to the inverter - GEN3PLUS: add MQTT topics to send AT commands to the inverter

View File

@@ -1,6 +1,5 @@
import logging import logging
import traceback import traceback
import asyncio
from messages import hex_dump_memory from messages import hex_dump_memory
logger = logging.getLogger('conn') logger = logging.getLogger('conn')
@@ -59,10 +58,7 @@ class AsyncStream():
while True: while True:
try: try:
if self.state == self.STATE_UP and self.server_side: await self.__async_read()
await asyncio.wait_for(self.__async_read(), 150)
else:
await self.__async_read()
if self.unique_id: if self.unique_id:
await self.async_write() await self.async_write()
@@ -84,12 +80,6 @@ class AsyncStream():
self.close() self.close()
return self return self
except asyncio.TimeoutError:
logger.warning(f"Timeout for {self.l_addr}")
await self.disc()
self.close()
return self
except Exception: except Exception:
self.inc_counter('SW_Exception') self.inc_counter('SW_Exception')
logger.error( logger.error(