|
|
|
@ -311,15 +311,11 @@ where
|
|
|
|
|
SwarmEvent::IncomingConnectionError { send_back_addr: address, error, .. } => {
|
|
|
|
|
tracing::warn!(%address, "Failed to set up connection with peer. Error {:#}", error);
|
|
|
|
|
}
|
|
|
|
|
SwarmEvent::ConnectionClosed { peer_id: peer, num_established, endpoint, cause } if num_established == 0 => {
|
|
|
|
|
match cause {
|
|
|
|
|
Some(error) => {
|
|
|
|
|
SwarmEvent::ConnectionClosed { peer_id: peer, num_established, endpoint, cause: Some(error) } if num_established == 0 => {
|
|
|
|
|
tracing::warn!(%peer, address = %endpoint.get_remote_address(), "Lost connection. Error {:#}", error);
|
|
|
|
|
},
|
|
|
|
|
None => {
|
|
|
|
|
tracing::info!(%peer, address = %endpoint.get_remote_address(), "Successfully closed connection");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SwarmEvent::ConnectionClosed { peer_id: peer, num_established, endpoint, cause: None } if num_established == 0 => {
|
|
|
|
|
tracing::info!(%peer, address = %endpoint.get_remote_address(), "Successfully closed connection");
|
|
|
|
|
}
|
|
|
|
|
SwarmEvent::NewListenAddr(address) => {
|
|
|
|
|
tracing::info!(%address, "New listen address detected");
|
|
|
|
|