From ae052a805b11569af6e9e932a2fa073d32c73d6e Mon Sep 17 00:00:00 2001 From: EAimTY Date: Tue, 30 May 2023 19:43:37 +0900 Subject: [PATCH] fix packet resource logging on client --- tuic-client/src/connection/handle_task.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tuic-client/src/connection/handle_task.rs b/tuic-client/src/connection/handle_task.rs index 44e423d..47a4348 100644 --- a/tuic-client/src/connection/handle_task.rs +++ b/tuic-client/src/connection/handle_task.rs @@ -95,9 +95,17 @@ impl Connection { let assoc_id = pkt.assoc_id(); let pkt_id = pkt.pkt_id(); + let mode = if pkt.is_from_native() { + "native" + } else if pkt.is_from_quic() { + "quic" + } else { + unreachable!() + }; + match pkt.accept().await { Ok(Some((pkt, addr, _))) => { - log::info!("[relay] [packet] [{assoc_id:#06x}] [from-native] [{pkt_id:#06x}] {addr}"); + log::info!("[relay] [packet] [{assoc_id:#06x}] [from-{mode}] [{pkt_id:#06x}] {addr}"); let addr = match addr { Address::None => unreachable!(),