From 84d62cbe9a84bd0dcc18aa714f6048f48db5a999 Mon Sep 17 00:00:00 2001 From: pazzarpj Date: Wed, 22 Apr 2020 12:04:52 +1000 Subject: [PATCH] - Added the connected event to transaction limit for TCP client so that modbus commands will wait until connected - Version Bump --- aiomodbus/tcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiomodbus/tcp.py b/aiomodbus/tcp.py index 3542c2f..ddedfb8 100644 --- a/aiomodbus/tcp.py +++ b/aiomodbus/tcp.py @@ -87,8 +87,8 @@ class ModbusTCPClient: running: bool = True def __post_init__(self): - self.transaction_limit = TransactionLimit(self.max_active_requests) self.connected = asyncio.Event() + self.transaction_limit = TransactionLimit(self.max_active_requests, self.connected) async def connect(self): try: