diff --git a/perf/src/packet.rs b/perf/src/packet.rs index 17c49069cd8514..64bc4366ea431e 100644 --- a/perf/src/packet.rs +++ b/perf/src/packet.rs @@ -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