-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModbusTcpClient doesn't do reconnects? #2320
Comments
the async client do automatic reconnect, wh6 do you think there are no automatic reconnect? If you think there is a bug, then please add a debug log so we can see what happens. |
Of course it seems to be a wrong documentation, 8n that case a pull request is welcome. |
This is specifically for the sync client. Happy to make a pull request if you confirm the sync client also does reconnects. |
The sync client do not do automatic reconnect, as far as I remember. |
sync uses a different approach, it connects if a request is sent and it's not connected. |
Ah, yes, I think I see - pymodbus/pymodbus/client/base.py Line 235 in aa7e556
I'll see if there's a better way to word the documentation. |
I've found a different way to phrase the docs. However, it seems like it would make sense to remove the reconnect_delay/reconnect_delay_max params from the sync clients, since they don't use them. I'm guessing that removing those would be an API change? For the moment I can flag them as 'not used in the sync client'. |
Sync clients don't do reconnection in the same way as async clients, and should have a little more explanation as to what they do. See issue pymodbus-dev#2320
Versions
Pymodbus Specific
Description
On:
https://github.com/pymodbus-dev/pymodbus/blob/dcbcfd7f16fb3be82525bccf9699855a06f900c5/pymodbus/client/tcp.py#L129C1-L129C74
there is the comment:
Remark: There are no automatic reconnect as with AsyncModbusTcpClient
Is this true? The docs say:
which seems to contradict this.
This also suggests that this part of the docstring for ModbusTcpClient might be incorrect, if there is no automatic reconnection:
Not a problem if it's not supported, I was just surprised to find this.
The text was updated successfully, but these errors were encountered: