Skip to content

Commit c7d54c2

Browse files
committedMay 1, 2024·
fix: ConnectionResetError
1 parent da17283 commit c7d54c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tcp_modbus_aio/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ async def clear_tcp_connection(self) -> None:
314314

315315
try:
316316
await self._writer.wait_closed()
317-
except TimeoutError:
317+
except (TimeoutError, ConnectionResetError):
318318
if self.logger is not None:
319319
self.logger.warning(
320320
f"[{self}][clear_tcp_connection] connection close timed out, continuing anyway"

0 commit comments

Comments
 (0)
Please sign in to comment.