Skip to content

Commit

Permalink
Do not disable PTO when packets outstanding == 0 for initial/handshake
Browse files Browse the repository at this point in the history
See recovery 6.2.2.1, the client needs to keep sending packets until it
receives HandshakeDone, even if all previous PTOs are acked and
in_flight_outstanding drops to zero.
  • Loading branch information
Andy Grover committed Jul 27, 2020
1 parent cb3443c commit 00b6998
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions neqo-transport/src/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,13 @@ impl LossRecoverySpace {
debug_assert!(self.in_flight_outstanding > 0);
self.in_flight_outstanding -= 1;
if self.in_flight_outstanding == 0 {
qtrace!("remove_packet outstanding == 0");
self.pto_base_time = None;
qtrace!("remove_packet outstanding == 0 for space {}", self.space);

// See above comments; keep PTO armed for Initial/Handshake even
// if no outstanding packets.
if self.space == PNSpace::ApplicationData {
self.pto_base_time = None;
}
}
}
}
Expand Down

0 comments on commit 00b6998

Please sign in to comment.