QUIC client do not send new request if now is close to idle timeout. Only affecting client, not protected.

PiperOrigin-RevId: 323845829
Change-Id: Iabaddc08fb901d28e228cd89d96add2ef4e88e85
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index ae536a2..1a97417 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -1576,5 +1576,12 @@
   return handshake_finished_ || handshake_packet_acked_;
 }
 
+bool QuicSentPacketManager::IsLessThanThreePTOs(QuicTime::Delta timeout) const {
+  const QuicTime::Delta retransmission_delay =
+      pto_enabled_ ? GetProbeTimeoutDelay(APPLICATION_DATA)
+                   : GetRetransmissionDelay();
+  return timeout < 3 * retransmission_delay;
+}
+
 #undef ENDPOINT  // undef for jumbo builds
 }  // namespace quic