mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
cleanup
This commit is contained in:
parent
76f5052960
commit
c264d6fbbe
@ -43,7 +43,7 @@ impl ConnectionHandle {
|
||||
}
|
||||
}
|
||||
|
||||
// #[cfg_attr(feature="verbose-tracing", instrument(level="trace", skip(self, message), fields(message.len = message.len())))]
|
||||
// #[instrument(level="trace", target="net", skip(self, message), fields(message.len = message.len()))]
|
||||
// pub fn send(&self, message: Vec<u8>) -> ConnectionHandleSendResult {
|
||||
// match self.channel.send((Span::current().id(), message)) {
|
||||
// Ok(()) => ConnectionHandleSendResult::Sent,
|
||||
@ -51,7 +51,7 @@ impl ConnectionHandle {
|
||||
// }
|
||||
// }
|
||||
|
||||
#[cfg_attr(feature="verbose-tracing", instrument(level="trace", skip(self, message), fields(message.len = message.len())))]
|
||||
#[instrument(level="trace", target="net", skip(self, message), fields(message.len = message.len()))]
|
||||
pub async fn send_async(&self, message: Vec<u8>) -> ConnectionHandleSendResult {
|
||||
match self
|
||||
.channel
|
||||
|
@ -9,6 +9,7 @@ use stop_token::future::FutureExt;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum ConnectionManagerEvent {
|
||||
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
Accepted(ProtocolNetworkConnection),
|
||||
Dead(NetworkConnection),
|
||||
}
|
||||
@ -420,7 +421,6 @@ impl ConnectionManager {
|
||||
}
|
||||
}
|
||||
|
||||
//#[instrument(level = "trace", skip_all)]
|
||||
async fn async_processor(
|
||||
self,
|
||||
stop_token: StopToken,
|
||||
@ -438,7 +438,7 @@ impl ConnectionManager {
|
||||
|
||||
// Called by low-level network when any connection-oriented protocol connection appears
|
||||
// either from incoming connections.
|
||||
//#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
pub(super) async fn on_accepted_protocol_network_connection(
|
||||
&self,
|
||||
protocol_connection: ProtocolNetworkConnection,
|
||||
@ -465,7 +465,6 @@ impl ConnectionManager {
|
||||
|
||||
// Callback from network connection receive loop when it exits
|
||||
// cleans up the entry in the connection table
|
||||
#[instrument(level = "trace", skip(self))]
|
||||
pub(super) async fn report_connection_finished(&self, connection_id: NetworkConnectionId) {
|
||||
// Get channel sender
|
||||
let sender = {
|
||||
|
@ -69,8 +69,10 @@ pub struct ProtocolConfig {
|
||||
pub outbound: ProtocolTypeSet,
|
||||
pub inbound: ProtocolTypeSet,
|
||||
pub family_global: AddressTypeSet,
|
||||
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
pub family_local: AddressTypeSet,
|
||||
pub public_internet_capabilities: Vec<FourCC>,
|
||||
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
pub local_network_capabilities: Vec<FourCC>,
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,10 @@ impl NetworkConnection {
|
||||
need_sender = false;
|
||||
let sender_fut = receiver.recv_async().then(|res| async {
|
||||
match res {
|
||||
Ok((_span_id, message)) => {
|
||||
Ok((span_id, message)) => {
|
||||
|
||||
let span = span!(parent: span_id, Level::TRACE, "process_connection send");
|
||||
let _enter = span.enter();
|
||||
|
||||
// Touch the LRU for this connection
|
||||
connection_manager.touch_connection_by_id(connection_id);
|
||||
@ -317,7 +320,7 @@ impl NetworkConnection {
|
||||
&protocol_connection,
|
||||
stats.clone(),
|
||||
message,
|
||||
).in_current_span()
|
||||
)
|
||||
.await
|
||||
{
|
||||
// Sending the packet along can fail, if so, this connection is dead
|
||||
|
Loading…
Reference in New Issue
Block a user