-
Notifications
You must be signed in to change notification settings - Fork 24
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
Greatly improve connection resets on DoIP and miscellaneous fixes throughout #610
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ferdinandjarisch
requested review from
fkglr,
rumpelsepp and
peckto
as code owners
October 21, 2024 10:38
ferdinandjarisch
force-pushed
the
doip-hotfixes
branch
5 times, most recently
from
October 23, 2024 06:48
0320ce4
to
97d57d8
Compare
Tasks that terminate with error will produce a stack trace that will be displayed once the interpreter finished. This commit ensures that we consume the stack trace and generate a log message when it happens instead.
Currently we never call wait_for_ecu with a explicit timeout value but instead default on self.timeout. This is unexpected and can be confusing, so instead default to 10s, which is 5x more than the current default of 2s coming from self.timeout
UDSExceptions do not require to reconnect the transport.
Currently max_retry already counts the initial request as well, which is counter-intuitive. This commit effectively turns retries into retries, meaning a value for max_retry of 3 would result in a total of 4 requests sent to the target.
ferdinandjarisch
force-pushed
the
doip-hotfixes
branch
from
October 23, 2024 06:54
97d57d8
to
6002428
Compare
rumpelsepp
approved these changes
Oct 23, 2024
The TCP connection of DoIP can close midway through a request, currently resulting in broken states. This commit gracefully handles ConnectionErrors while waiting for a response within the retry loop, such that recoverable ConnectionErrors are simply recovered.
This commit adds a loop to the reconnect function to be able to recover also when the very first reconnection-attempt is unsuccessful. The loop is only active, however, when a timeout value is set, which for now will only be the case for DoIP.
ferdinandjarisch
force-pushed
the
doip-hotfixes
branch
from
October 23, 2024 07:00
6002428
to
bfde863
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is a collection of multiple fixes and small adaptions at different levels.
Most notably, it greatly improves the handling of ConnectionErrors, especially for DoIP, rendering our transport stack way more resilient against connection losses during, e.g., planned reconnects or unexpected ECU crashes.