feat: abort Send Data
commands early after timeout, reduce callback timeout
#6411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
for #6402
This PR introduces an additional timeout for
Send Data
commands. If this elapses while waiting for a callback, the transmission gets aborted. The driver will still wait for the callback, but unless the controller is actually unresponsive, this should now come relatively quickly.The default for this is 20 seconds and the callback timeout has been lowered from 65 seconds to 30 seconds. While the specs explicitly mention the 65 seconds, waiting this long has shown to cause problems when nodes are reporting and expect a response.
Some commercial hubs abort around 8-10 seconds, but that seems a tad too low. I may revisit this timeout though.
This change may alleviate some of the issues with unresponsive controllers, assuming they'll honor the abort request and eventually send the callback. If not, the recovery now kicks in faster.