File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ def _try_merge_address_length(
90
90
else : # address2, address1, end1, end2
91
91
return address2 , end2 - address2
92
92
93
+ return None
94
+
93
95
async def ensure_client (self ) -> bool :
94
96
if self ._pymodbus_client and self ._pymodbus_client .connected :
95
97
return True
@@ -102,7 +104,9 @@ async def ensure_client(self) -> bool:
102
104
self .debug ('waiting %d seconds for initial delay' , self .initial_delay )
103
105
await asyncio .sleep (self .initial_delay )
104
106
105
- while not self ._pymodbus_client .connected :
107
+ for _ in range (self .timeout * 10 ):
108
+ if self ._pymodbus_client .connected :
109
+ break
106
110
await asyncio .sleep (0.1 )
107
111
108
112
if not self ._pymodbus_client .connected :
Original file line number Diff line number Diff line change 12
12
packages = find_namespace_packages (),
13
13
14
14
install_requires = [
15
- 'pymodbus>=3.6' ,
15
+ 'pymodbus>=3.6,<3.7 ' ,
16
16
]
17
17
)
You can’t perform that action at this time.
0 commit comments