Skip to content

Commit

Permalink
refactor(iroh-net): Failing to bind is not a Warning log (#2815)
Browse files Browse the repository at this point in the history
## Description

If the bind is required the call stack already makes sure that this is
surfaced correctly.  It is in fact entirely normal if IPv6 to fail to
bind and this is already logged on INFO level.  We do not need an
additional WARN log for this.

This also doesn't need to debug-log the error, anyhow's alternate
logging mechanism is perfect for this.

## Breaking Changes

None

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [x] Self-review.
- [x] 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.
- [x] Tests if relevant.
- [x] All breaking changes documented.
  • Loading branch information
flub authored Oct 18, 2024
1 parent a36970a commit f08011a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iroh-net/src/magicsock/udp_conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use anyhow::{bail, Context as _};
use quinn::AsyncUdpSocket;
use quinn_udp::{Transmit, UdpSockRef};
use tokio::io::Interest;
use tracing::{debug, trace, warn};
use tracing::{debug, trace};

use crate::net::UdpSocket;

Expand Down Expand Up @@ -137,7 +137,7 @@ fn bind(mut addr: SocketAddr) -> anyhow::Result<UdpSocket> {
return Ok(pconn);
}
Err(err) => {
warn!(%addr, "failed to bind: {:#?}", err);
debug!(%addr, "failed to bind: {err:#}");
continue;
}
}
Expand Down

0 comments on commit f08011a

Please sign in to comment.