From d160344a77d3192386f5a737cbf83cd2332a8213 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 14 Sep 2022 14:45:44 -0400 Subject: [PATCH] remove debugging code --- .../src/network_manager/connection_manager.rs | 5 ----- veilid-core/src/network_manager/mod.rs | 22 +++++++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/veilid-core/src/network_manager/connection_manager.rs b/veilid-core/src/network_manager/connection_manager.rs index 191bb8b4..7686425f 100644 --- a/veilid-core/src/network_manager/connection_manager.rs +++ b/veilid-core/src/network_manager/connection_manager.rs @@ -185,11 +185,6 @@ impl ConnectionManager { // Connection already exists let desc = conn.connection_descriptor(); let _ = inner.sender.send(ConnectionManagerEvent::Dead(conn)); - // xxx remove this - panic!( - "connection already exists: {:?} connection_table: {:#?}", - desc, self.arc.connection_table - ); return Ok(NetworkResult::no_connection_other(format!( "connection already exists: {:?}", desc diff --git a/veilid-core/src/network_manager/mod.rs b/veilid-core/src/network_manager/mod.rs index 3e97582e..f9090069 100644 --- a/veilid-core/src/network_manager/mod.rs +++ b/veilid-core/src/network_manager/mod.rs @@ -1314,14 +1314,14 @@ impl NetworkManager { ) -> SendPinBoxFuture>> { let this = self.clone(); Box::pin(async move { - info!("{}", format!("send_data to: {:?}", node_ref).red()); + // info!("{}", format!("send_data to: {:?}", node_ref).red()); // First try to send data to the last socket we've seen this peer on let data = if let Some(connection_descriptor) = node_ref.last_connection() { - info!( - "{}", - format!("last_connection to: {:?}", connection_descriptor).red() - ); + // info!( + // "{}", + // format!("last_connection to: {:?}", connection_descriptor).red() + // ); match this .net() @@ -1329,11 +1329,11 @@ impl NetworkManager { .await? { None => { - info!( - "{}", - format!("sent to existing connection: {:?}", connection_descriptor) - .red() - ); + // info!( + // "{}", + // format!("sent to existing connection: {:?}", connection_descriptor) + // .red() + // ); // Update timestamp for this last connection since we just sent to it node_ref.set_last_connection(connection_descriptor, intf::get_timestamp()); @@ -1348,7 +1348,7 @@ impl NetworkManager { data }; - info!("{}", "no existing connection".red()); + // info!("{}", "no existing connection".red()); // If we don't have last_connection, try to reach out to the peer via its dial info let contact_method = this.get_contact_method(node_ref.clone());