1
0

fix packet resource logging on client

This commit is contained in:
EAimTY 2023-05-30 19:43:37 +09:00
parent 64164e18c9
commit ae052a805b

View File

@ -95,9 +95,17 @@ impl Connection {
let assoc_id = pkt.assoc_id(); let assoc_id = pkt.assoc_id();
let pkt_id = pkt.pkt_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 { match pkt.accept().await {
Ok(Some((pkt, addr, _))) => { 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 { let addr = match addr {
Address::None => unreachable!(), Address::None => unreachable!(),