Skip to content

Commit

Permalink
Don't Apply Min Idle Timeout During Handshake (#1780)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Jun 29, 2021
1 parent 41bf928 commit 0645531
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -5511,16 +5511,18 @@ QuicConnResetIdleTimeout(
}

if (IdleTimeoutMs != 0) {
//
// Idle timeout must be no less than the PTOs for closing.
//
uint32_t MinIdleTimeoutMs =
US_TO_MS(QuicLossDetectionComputeProbeTimeout(
&Connection->LossDetection,
&Connection->Paths[0],
QUIC_CLOSE_PTO_COUNT));
if (IdleTimeoutMs < MinIdleTimeoutMs) {
IdleTimeoutMs = MinIdleTimeoutMs;
if (Connection->State.Connected) {
//
// Idle timeout must be no less than the PTOs for closing.
//
uint32_t MinIdleTimeoutMs =
US_TO_MS(QuicLossDetectionComputeProbeTimeout(
&Connection->LossDetection,
&Connection->Paths[0],
QUIC_CLOSE_PTO_COUNT));
if (IdleTimeoutMs < MinIdleTimeoutMs) {
IdleTimeoutMs = MinIdleTimeoutMs;
}
}

QuicConnTimerSet(Connection, QUIC_CONN_TIMER_IDLE, IdleTimeoutMs);
Expand Down

0 comments on commit 0645531

Please sign in to comment.