fix(iroh-net): do not log as error if client disconnects from relay #2259
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.
Description
In the relay server, we currently log all connection failures with
error
severity. This means that whenever a node disconnects while still in the TLS handshaking phase, we get an error log.:This however is a perfectly fine thing, a node may decide to abort the connection to a relay whenever it pleases. Especially in tests we often shutdown while still in the process of connecting to a relay. This is annoying, because the
error
severity indicates things being wrong (especially with the stack traces we print on error logs in the CI).This PR checks if the error is a EOF and if so only prints it as a debug log.
Breaking Changes
Notes & open questions
Change checklist