Skip to content

Commit

Permalink
discards packets which are not (fully) populated
Browse files Browse the repository at this point in the history
Not discarding packets which are not (fully) populated is bug prone or
might waste resources.
  • Loading branch information
behzadnouri committed Nov 6, 2024
1 parent 5a6f518 commit 93efcda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions perf/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ impl PacketBatch {
// break the payload into smaller messages, and here any errors
// should be propagated.
error!("Couldn't write to packet {:?}. Data skipped.", e);
packet.meta_mut().set_discard(true);
}
} else {
trace!("Dropping packet, as destination is unknown");
packet.meta_mut().set_discard(true);
}
}
batch
Expand Down

0 comments on commit 93efcda

Please sign in to comment.