Skip to content

Commit

Permalink
fix: ConnectionResetError
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuafishman committed May 1, 2024
1 parent da17283 commit c7d54c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcp_modbus_aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async def clear_tcp_connection(self) -> None:

try:
await self._writer.wait_closed()
except TimeoutError:
except (TimeoutError, ConnectionResetError):
if self.logger is not None:
self.logger.warning(
f"[{self}][clear_tcp_connection] connection close timed out, continuing anyway"
Expand Down

0 comments on commit c7d54c2

Please sign in to comment.