Skip to content
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

Add connection exception to list of exceptions catpured in retries #2113

Conversation

johnmiko
Copy link
Contributor

@johnmiko johnmiko commented Mar 21, 2024

It's possible when using a Modbus TCP connection that the connection is unexpectedly closed while writing to a register. This raises a ConnectionException that is not caught in the existing catch statement.

Note: The retry is done in the retry_on_empty catch

It's possible that this type of exception should not be caught, and should instead raise an error as the connection should not close unexpectedly. If I misunderstood, feel free to decline the pull request

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@janiversen janiversen merged commit 9c2c874 into pymodbus-dev:dev Mar 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants