From d36d015c9bedf268d3bf5f041744f22c12467168 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Thu, 28 Mar 2019 19:44:39 -0700 Subject: [PATCH] Fix handshake retransmit timing in_flight.crypto can be 0 when retransmitted handshake data is pending but not yet actually retransmitted. --- quinn-proto/src/connection.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quinn-proto/src/connection.rs b/quinn-proto/src/connection.rs index cf663a5dc..8f0662334 100644 --- a/quinn-proto/src/connection.rs +++ b/quinn-proto/src/connection.rs @@ -662,7 +662,10 @@ impl Connection { } fn set_loss_detection_timer(&mut self) { - if self.in_flight.crypto != 0 || (self.state.is_handshake() && self.side.is_client()) { + if self.in_flight.crypto != 0 + || self.crypto_count != 0 + || (self.state.is_handshake() && self.side.is_client()) + { // Handshake retransmission alarm. let timeout = if let Some(smoothed) = self.rtt.smoothed { 2 * smoothed