From 4332ba71d009516a9f451fb6d1177ff6d9705428 Mon Sep 17 00:00:00 2001 From: mle Date: Wed, 1 May 2024 16:05:25 +0200 Subject: [PATCH] Do not reset retry counter when future is complete --- goodwe/protocol.py | 1 - 1 file changed, 1 deletion(-) diff --git a/goodwe/protocol.py b/goodwe/protocol.py index 565a7a6..8f959d4 100644 --- a/goodwe/protocol.py +++ b/goodwe/protocol.py @@ -148,7 +148,6 @@ def _retry_mechanism(self) -> None: """Retry mechanism to prevent hanging transport""" if self.response_future.done(): logger.debug("Response already received.") - self._retry = 0 elif self._retry < self.retries: if self._timer: logger.debug("Failed to receive response to %s in time (%ds).", self.command, self.timeout)