Skip to content

Commit 9e511b7

Browse files
committed
fix: add uplink_id to dropped package trace log
Fixes #122
1 parent 1bf4a38 commit 9e511b7

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/mesh.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@ async fn relay_mesh_packet(pl: &gw::UplinkFrame, mut packet: MeshPacket) -> Resu
318318
match &mut packet.payload {
319319
packets::Payload::Uplink(pl) => {
320320
if pl.relay_id == relay_id {
321-
trace!("Dropping packet as this relay was the sender");
321+
trace!(
322+
"Dropping packet as this relay was the sender, uplink_id: {}",
323+
rx_info.uplink_id
324+
);
322325

323326
// Drop the packet, as we are the original sender.
324327
return Ok(());
@@ -365,7 +368,10 @@ async fn relay_mesh_packet(pl: &gw::UplinkFrame, mut packet: MeshPacket) -> Resu
365368
}
366369
packets::Payload::Event(pl) => {
367370
if pl.relay_id == relay_id {
368-
trace!("Dropping packet as this relay was the sender");
371+
trace!(
372+
"Dropping packet as this relay was the sender, uplink_id: {}",
373+
rx_info.uplink_id
374+
);
369375

370376
// Drop the packet, as we are the sender.
371377
return Ok(());

0 commit comments

Comments
 (0)