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 d2ddaf7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neqo-transport/src/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,9 @@ impl LossRecoverySpace {
if p.ack_eliciting() {
debug_assert!(self.in_flight_outstanding > 0);
self.in_flight_outstanding -= 1;
if self.in_flight_outstanding == 0 {
qtrace!("remove_packet outstanding == 0");
if self.space == PNSpace::ApplicationData && self.in_flight_outstanding == 0 {
// See above comments; keep PTO armed for Initial/Handshake even
// if no outstanding packets.
self.pto_base_time = None;
}
}
Expand Down

0 comments on commit d2ddaf7

Please sign in to comment.