Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iroh-net): do not log as error if client disconnects from relay (#…
…2259) ## 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.: ``` 2024-05-02T09:00:38.443215Z ERROR relay server{me=svfacrfjgmv7fjeu}:relay-http-serve:conn{peer=127.0.0.1:33596}: iroh_net::relay::http::server: [HTTPS] relay: failed to handl e connection: TLS[manual] accept ``` 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 <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review.
- Loading branch information