Reconnect after Not connected. #1646
-
Hello, async def create_modbus_client() -> AsyncModbusTcpClient: loop = get_event_loop() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
you do not say which release you use? is it the assert you have that fails or later ? pymodbus does "reconnect" meaning only after the first successful connect. If you want us to look at what happens then please use "pymodbus_apply_log... as pr issue documentation so we can see what happens. If you want to reconnect because the first connect fails, you simply need to call .connect(), if it happens later you need to do nothing. |
Beta Was this translation helpful? Give feedback.
-
Looking at your program is seems very strange, why have a task for the first connect ? I think it would help you looking at our examples like e.g. client_async.py |
Beta Was this translation helpful? Give feedback.
you do not say which release you use?
is it the assert you have that fails or later ? pymodbus does "reconnect" meaning only after the first successful connect.
If you want us to look at what happens then please use "pymodbus_apply_log... as pr issue documentation so we can see what happens.
If you want to reconnect because the first connect fails, you simply need to call .connect(), if it happens later you need to do nothing.