Fix idle timeout negotiation
When clients configure the maximum idle timeout to a different value (as Chrome does), we need to use that maximum instead of the default maximum.
gfe-relnote: fix idle timeout negotiation, protected by disabled TLS flag
PiperOrigin-RevId: 268567456
Change-Id: I4db42fdcb73530a5049cf7b2953128b8b917b10f
diff --git a/quic/core/quic_config.cc b/quic/core/quic_config.cc
index c62a00a..425dbdf 100644
--- a/quic/core/quic_config.cc
+++ b/quic/core/quic_config.cc
@@ -900,9 +900,9 @@
// An idle timeout of zero indicates it is disabled (in other words, it is
// set to infinity). When the idle timeout is very high, we set it to our
// preferred maximum and still probe that often.
- if (idle_timeout_seconds > kMaximumIdleTimeoutSecs ||
+ if (idle_timeout_seconds > idle_network_timeout_seconds_.GetMax() ||
idle_timeout_seconds == 0) {
- idle_timeout_seconds = kMaximumIdleTimeoutSecs;
+ idle_timeout_seconds = idle_network_timeout_seconds_.GetMax();
}
QuicErrorCode error = idle_network_timeout_seconds_.ReceiveValue(
idle_timeout_seconds, hello_type, error_details);
@@ -986,6 +986,7 @@
}
}
+ *error_details = "";
return QUIC_NO_ERROR;
}