Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
logs (#10817)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored and dvdplm committed Jul 4, 2019
1 parent bacc0f0 commit bbae075
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/network-devp2p/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ impl Connection {

/// Get remote peer address string
pub fn remote_addr_str(&self) -> String {
self.socket.peer_addr().map(|a| a.to_string()).unwrap_or_else(|_| "Unknown".to_owned())
self.socket.peer_addr().map(|a| a.to_string()).unwrap_or_else(|err| {
debug!("error occurred getting peer_addr: {}, connection token: {}", err, self.token);
"Unknown peer address".to_owned()
})
}

/// Get local peer address string
Expand Down

0 comments on commit bbae075

Please sign in to comment.