mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 19:48:19 +00:00
Fix handshake retransmit timing
in_flight.crypto can be 0 when retransmitted handshake data is pending but not yet actually retransmitted.
This commit is contained in:
committed by
Dirkjan Ochtman
parent
3995ea2006
commit
d36d015c9b
@@ -662,7 +662,10 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn set_loss_detection_timer(&mut self) {
|
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.
|
// Handshake retransmission alarm.
|
||||||
let timeout = if let Some(smoothed) = self.rtt.smoothed {
|
let timeout = if let Some(smoothed) = self.rtt.smoothed {
|
||||||
2 * smoothed
|
2 * smoothed
|
||||||
|
|||||||
Reference in New Issue
Block a user