File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,13 @@ def _detect_pymodbus_version(self) -> None:
52
52
53
53
async def _connect (self ) -> None :
54
54
"""Start asynchronous reconnect loop."""
55
- async with self .lock :
56
- try :
57
- if self .pymodbus30plus :
58
- await asyncio .wait_for (self .client .connect (), timeout = self .timeout ) # 3.x
59
- else : # 2.4.x - 2.5.x
60
- await self .client .start (self .ip ) # type: ignore
61
- except Exception :
62
- raise OSError (f"Could not connect to '{ self .ip } '." )
55
+ try :
56
+ if self .pymodbus30plus :
57
+ await asyncio .wait_for (self .client .connect (), timeout = self .timeout ) # 3.x
58
+ else : # 2.4.x - 2.5.x
59
+ await self .client .start (self .ip ) # type: ignore
60
+ except Exception :
61
+ raise OSError (f"Could not connect to '{ self .ip } '." )
63
62
64
63
async def read_coils (self , address : int , count ):
65
64
"""Read modbus output coils (0 address prefix)."""
You can’t perform that action at this time.
0 commit comments