catch all OSError errors in the read loop
This commit is contained in:
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- catch all OSError errors in the read loop
|
||||||
|
- log Modbus traces with different log levels
|
||||||
- add Modbus fifo and timeout handler
|
- add Modbus fifo and timeout handler
|
||||||
- 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
|
||||||
|
|||||||
@@ -65,9 +65,7 @@ class AsyncStream():
|
|||||||
await self.__async_forward()
|
await self.__async_forward()
|
||||||
await self.async_publ_mqtt()
|
await self.async_publ_mqtt()
|
||||||
|
|
||||||
except (ConnectionResetError,
|
except OSError as error:
|
||||||
ConnectionAbortedError,
|
|
||||||
BrokenPipeError) as error:
|
|
||||||
logger.error(f'{error} for l{self.l_addr} | '
|
logger.error(f'{error} for l{self.l_addr} | '
|
||||||
f'r{self.r_addr}')
|
f'r{self.r_addr}')
|
||||||
await self.disc()
|
await self.disc()
|
||||||
|
|||||||
Reference in New Issue
Block a user