mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-08 04:11:08 +03:00
fix: peer connect panic on log (#2272)
This commit is contained in:
parent
daa712ae99
commit
7e8296dce0
1 changed files with 2 additions and 2 deletions
|
@ -97,14 +97,14 @@ impl Peer {
|
||||||
hs: &Handshake,
|
hs: &Handshake,
|
||||||
na: Arc<dyn NetAdapter>,
|
na: Arc<dyn NetAdapter>,
|
||||||
) -> Result<Peer, Error> {
|
) -> Result<Peer, Error> {
|
||||||
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);
|
let info = hs.initiate(capab, total_difficulty, self_addr, conn);
|
||||||
match info {
|
match info {
|
||||||
Ok(peer_info) => Ok(Peer::new(peer_info, na)),
|
Ok(peer_info) => Ok(Peer::new(peer_info, na)),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
debug!(
|
debug!(
|
||||||
"connect: handshaking with {:?} failed with error: {:?}",
|
"connect: handshaking with {:?} failed with error: {:?}",
|
||||||
conn.peer_addr().unwrap(),
|
conn.peer_addr(),
|
||||||
e
|
e
|
||||||
);
|
);
|
||||||
if let Err(e) = conn.shutdown(Shutdown::Both) {
|
if let Err(e) = conn.shutdown(Shutdown::Both) {
|
||||||
|
|
Loading…
Reference in a new issue