From 7e8296dce04af1415e720f328ff9e99db78e13af Mon Sep 17 00:00:00 2001 From: Gary Yu Date: Wed, 2 Jan 2019 09:54:17 +0800 Subject: [PATCH] fix: peer connect panic on log (#2272) --- p2p/src/peer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/src/peer.rs b/p2p/src/peer.rs index aa34c539d..91f93f986 100644 --- a/p2p/src/peer.rs +++ b/p2p/src/peer.rs @@ -97,14 +97,14 @@ impl Peer { hs: &Handshake, na: Arc, ) -> Result { - debug!("connect: handshaking with {:?}", conn.peer_addr().unwrap()); + debug!("connect: handshaking with {:?}", conn.peer_addr()); let info = hs.initiate(capab, total_difficulty, self_addr, conn); match info { Ok(peer_info) => Ok(Peer::new(peer_info, na)), Err(e) => { debug!( "connect: handshaking with {:?} failed with error: {:?}", - conn.peer_addr().unwrap(), + conn.peer_addr(), e ); if let Err(e) = conn.shutdown(Shutdown::Both) {