Skip to content

Commit

Permalink
Only write generated packets, and only ones without test frames
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Apr 18, 2024
1 parent e5159e5 commit 9a78b7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,16 +1101,16 @@ impl Connection {
#[must_use = "Output of the process function must be handled"]
pub fn process(&mut self, dgram: Option<&Datagram>, now: Instant) -> Output {
if let Some(d) = dgram {
#[cfg(feature = "build-fuzzing-corpus")]
neqo_common::write_item_to_fuzzing_corpus("packet", d);
self.input(d, now, now);
self.process_saved(now);
}
#[allow(clippy::let_and_return)]
let output = self.process_output(now);
#[cfg(feature = "build-fuzzing-corpus")]
if let Some(d) = output.clone().dgram() {
neqo_common::write_item_to_fuzzing_corpus("packet", &d);
#[cfg(all(feature = "build-fuzzing-corpus", test))]
if self.test_frame_writer.is_none() {
if let Some(d) = output.clone().dgram() {
neqo_common::write_item_to_fuzzing_corpus("packet", &d);
}
}
output
}
Expand Down

0 comments on commit 9a78b7f

Please sign in to comment.