From 213f5d7e8e91924132b6379e01907b934460e7c6 Mon Sep 17 00:00:00 2001 From: alexis-care <146740912+alexis-care@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:03:50 +0100 Subject: [PATCH] re-instatiate Future on reconnect (#2501) --- pymodbus/transaction/transaction.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pymodbus/transaction/transaction.py b/pymodbus/transaction/transaction.py index 6bea652b5..9c9a0ef5f 100644 --- a/pymodbus/transaction/transaction.py +++ b/pymodbus/transaction/transaction.py @@ -177,6 +177,7 @@ def callback_connected(self) -> None: """Call when connection is succcesfull.""" self.count_no_responses = 0 self.next_tid = 0 + self.response_future = asyncio.Future() self.trace_connect(True) def callback_disconnected(self, exc: Exception | None) -> None: