We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ae24e8 commit 0e55b6eCopy full SHA for 0e55b6e
tcp_modbus_aio/client.py
@@ -314,10 +314,11 @@ async def clear_tcp_connection(self) -> None:
314
315
try:
316
await self._writer.wait_closed()
317
- except (TimeoutError, ConnectionResetError):
+ except (TimeoutError, ConnectionResetError, OSError) as e:
318
if self.logger is not None:
319
self.logger.warning(
320
- f"[{self}][clear_tcp_connection] connection close timed out, continuing anyway"
+ f"[{self}][clear_tcp_connection] {type(e).__name__}({e}) error on connection close, "
321
+ "continuing anyway"
322
)
323
324
pass
0 commit comments