-
Notifications
You must be signed in to change notification settings - Fork 949
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
Correct retry loop. #1729
Correct retry loop. #1729
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides #1728, this commit causes a new issue: ModbusIOException
will not be raised in case of a request timeout.
it will after the retries. |
Let's assume UnboundLocalError: cannot access local variable 'resp' where it is not associated with a value |
Well that is quite another error, I will look at it, |
solved in #1731 |
Thanks, but now we have another issue: there will be If we consider |
The definition is "retries", so doing retries+1 is correct. |
OK, then this means I can have If I set 2023-08-13 14:31:41,023 DEBUG logging:102 Connecting to 10.10.2.23:502.
2023-08-13 14:31:41,023 DEBUG logging:102 Connecting comm
2023-08-13 14:31:41,654 DEBUG logging:102 Connected to comm
2023-08-13 14:31:41,655 DEBUG logging:102 callback_connected called
2023-08-13 14:31:41,655 DEBUG logging:102 send: 0x0 0x1 0x0 0x0 0x0 0x6 0xf7 0x3 0x0 0x26 0x0 0x2
2023-08-13 14:31:41,656 DEBUG logging:102 Adding transaction 1
2023-08-13 14:31:42,595 DEBUG logging:102 recv: 0x0 0x1 0x0 0x0 0x0 0x7 0xf7 0x3 0x4 0xc1 0x23 0xb6 0x0 addr=None
2023-08-13 14:31:42,595 DEBUG logging:102 Processing: 0x0 0x1 0x0 0x0 0x0 0x7 0xf7 0x3 0x4 0xc1 0x23 0xb6 0x0
2023-08-13 14:31:42,595 DEBUG logging:102 Factory Response[ReadHoldingRegistersResponse': 3]
2023-08-13 14:31:42,595 DEBUG logging:102 Getting transaction 1
2023-08-13 14:31:42,596 DEBUG logging:102 Connection lost comm due to Server not responding
Modbus Error: [Input/Output] ERROR: No response received after 0 retries The initial request was successful, but |
pull requests are welcome. |
There you go #1733. |
fixes #1702
fixes #1728