grid-x / modbus

BSD 3-Clause "New" or "Revised" License
78 stars 26 forks source link

Check recovery deadline only once #60

Closed andig closed 1 year ago

andig commented 1 year ago

This PR simplifies checking for recoveryDeadline being exceeded.

Note: refactoring the code like this, it seems to indicate that there is something wrong with the usage of ProtocolRecoveryTimeout. It's actual value is never used, only checked against being zero. In contrast, LinkRecoveryTimeout is used as input to sleep.

andig commented 1 year ago

Any feedback on this one? Open bug regarding ProtocolRecoveryTimeout?

hnicolaysen commented 1 year ago

@andig I will merge this PR now as preparation for #66. Another discussion for the ProtocolRecoveryTimeout problem would be great as this is still weird