Skip to content

Commit

Permalink
fix(log): minor fixes in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bochaco committed Sep 16, 2020
1 parent 06fb27f commit 0a9bf09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ impl QuicP2p {
let ip = contact.ip();

if ip.is_loopback() {
trace!("IP from ahrdcoded contact is loopback: {:?}", ip);
trace!(
"IP from hardcoded contact is loopback, setting our IP to: {:?}",
ip
);
our_ip = ip;
}
}
Expand Down Expand Up @@ -311,10 +314,7 @@ impl QuicP2p {
self.allow_random_port,
)?;

trace!(
"Bound endpoint to local address: {}",
quinn_endpoint.local_addr()?
);
trace!("Bound endpoint to local address: {}", self.local_addr);

let endpoint = Endpoint::new(quinn_endpoint, quinn_incoming, self.client_cfg.clone())?;

Expand All @@ -334,10 +334,7 @@ async fn new_connection_to(

let (quinn_endpoint, quinn_incoming) = bind(endpoint_cfg, local_addr, allow_random_port)?;

trace!(
"Bound connection to local address: {}",
quinn_endpoint.local_addr()?
);
trace!("Bound connection to local address: {}", local_addr);

let endpoint = Endpoint::new(quinn_endpoint, quinn_incoming, client_cfg)?;
let connection = endpoint.connect_to(node_addr).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Endpoint {
let local_addr = quic_endpoint.local_addr()?;
if local_addr.ip().is_unspecified() {
Err(Error::Configuration(
"No IP not specified in the config and IGD detection is disabled or not available."
"No IP specified in the config and IGD detection is disabled or not available."
.to_string(),
))
} else {
Expand Down

0 comments on commit 0a9bf09

Please sign in to comment.