Skip to content

Commit

Permalink
Handle also TimeoutError
Browse files Browse the repository at this point in the history
  • Loading branch information
mletenay committed May 4, 2024
1 parent 3041de9 commit bf04c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion goodwe/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def send_request(self, command: ProtocolCommand) -> Future:
return await self.send_request(command)
else:
return self._max_retries_reached()
except ConnectionRefusedError as exc:
except (ConnectionRefusedError, TimeoutError) as exc:
if self._retry < self.retries:
logger.debug("Connection refused error: %s", exc)
self._retry += 1
Expand Down

0 comments on commit bf04c57

Please sign in to comment.