Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Don't log expected errors (#3016)
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> I'm frequently seeing stuff like this in logs when running tests: ``` 2024-12-06T11:33:18.547916Z ERROR iroh::magicsock: 515: failed to send udp: operation would block node=m4suaktjwmn62wiz dst=172.17.0.1:60377 2024-12-06T11:33:18.548017Z ERROR iroh::magicsock: 560: no UDP or relay paths available for node node=m4suaktjwmn62wiz ``` These two logs are totally non-fatal and actually expected. The first one *especially* since `try_send_upd` can simply return `io::ErrorKind::WouldBlock` and that's totally normal. So we avoid printing an error in that case. I've also made the "no UDP or relay paths available for node" and another similar log debug level, as that's a state that we routinely encounter, is expected, and handled. ## Notes & open questions Just quickly noting that this log was in fact *so* annoying, I kept seeing the `WouldBlock` stuff a *lot* when running `iroh-doctor` with you on a train ride back then. It would mess up the whole terminal rendering :face_with_spiral_eyes: ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.~~ - ~~[ ] Tests if relevant.~~ - [x] All breaking changes documented.
- Loading branch information