Skip to content

Commit

Permalink
Take the whole Packet structure in process_payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith authored and djc committed Dec 8, 2023
1 parent b5d23a8 commit 106d44b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2190,9 +2190,7 @@ impl Connection {
let state = match self.state {
State::Established => {
match packet.header.space() {
SpaceId::Data => {
self.process_payload(now, remote, number.unwrap(), packet.payload.freeze())?
}
SpaceId::Data => self.process_payload(now, remote, number.unwrap(), packet)?,
_ => self.process_early_payload(now, packet)?,
}
return Ok(());
Expand Down Expand Up @@ -2412,7 +2410,7 @@ impl Connection {
ty: LongType::ZeroRtt,
..
} => {
self.process_payload(now, remote, number.unwrap(), packet.payload.freeze())?;
self.process_payload(now, remote, number.unwrap(), packet)?;
Ok(())
}
Header::VersionNegotiate { .. } => {
Expand Down Expand Up @@ -2498,8 +2496,9 @@ impl Connection {
now: Instant,
remote: SocketAddr,
number: u64,
payload: Bytes,
packet: Packet,
) -> Result<(), TransportError> {
let payload = packet.payload.freeze();
let is_0rtt = self.spaces[SpaceId::Data].crypto.is_none();
let mut is_probing_packet = true;
let mut close = None;
Expand Down

0 comments on commit 106d44b

Please sign in to comment.