In QUIC, add a copt to extend idle timeout by PTO on sent packets. Client side only, not protected.
PiperOrigin-RevId: 327529464
Change-Id: I6ee548b29ce911da865e21539ad1e710394bc924
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index a9204d6..4746eae 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -1583,10 +1583,12 @@
}
bool QuicSentPacketManager::IsLessThanThreePTOs(QuicTime::Delta timeout) const {
- const QuicTime::Delta retransmission_delay =
- pto_enabled_ ? GetProbeTimeoutDelay(APPLICATION_DATA)
- : GetRetransmissionDelay();
- return timeout < 3 * retransmission_delay;
+ return timeout < 3 * GetPtoDelay();
+}
+
+QuicTime::Delta QuicSentPacketManager::GetPtoDelay() const {
+ return pto_enabled_ ? GetProbeTimeoutDelay(APPLICATION_DATA)
+ : GetRetransmissionDelay();
}
#undef ENDPOINT // undef for jumbo builds