-
Notifications
You must be signed in to change notification settings - Fork 943
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
calling client.close() does not terminate the client process but causes a reconnect. #1198
Comments
Of course the client is connected when sending packets, this is done so to ensure an automatic reconnect if the server closes the connection. However the problem described is different, when the app calls client.close() it should not continue. |
I assume you are aware that the line you point out, is NOT an actual tcp/ip connect(), but it a method in our classes. |
You have lost me, I am not really sure what your idea are. BUT Pull requests are welcome and then we can review the suggested changes. is_socket_open() is in serial.py not the general for all types, and it is because for serial we need to know if the communication is open (which is NOT the same as being connected). |
The app (not pymodbus) uses client.close() when it wants to terminate the client, and continue doing other things, so the app expects the client to close connection and communication. The app will not do any more client calls. The current version does however reconnects to the server after a delay instead of keeping it closed. The workaround at the moment is to do
but that is not a good solution. |
Versions
Pymodbus Specific
Description
What were you trying, what has happened, what went wrong, and what did you expect?
Code and Logs
The text was updated successfully, but these errors were encountered: