gfe-relnote: Call NeuterHandshakePackets() once per connection. Protected by reloadable flag quic_neuter_handshake_packets_once. PiperOrigin-RevId: 272734447 Change-Id: Ie36ad546463e9965d19a2ac93181751c65e99b83
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc index 132eb0a..6baac98 100644 --- a/quic/core/quic_sent_packet_manager.cc +++ b/quic/core/quic_sent_packet_manager.cc
@@ -135,8 +135,9 @@ consecutive_pto_count_(0), fix_rto_retransmission_(false), handshake_mode_disabled_(false), - detect_spurious_losses_( - GetQuicReloadableFlag(quic_detect_spurious_loss)) { + detect_spurious_losses_(GetQuicReloadableFlag(quic_detect_spurious_loss)), + neuter_handshake_packets_once_( + GetQuicReloadableFlag(quic_neuter_handshake_packets_once)) { SetSendAlgorithm(congestion_control_type); } @@ -343,8 +344,13 @@ } void QuicSentPacketManager::SetHandshakeConfirmed() { - handshake_confirmed_ = true; - NeuterHandshakePackets(); + if (!neuter_handshake_packets_once_ || !handshake_confirmed_) { + if (neuter_handshake_packets_once_) { + QUIC_RELOADABLE_FLAG_COUNT(quic_neuter_handshake_packets_once); + } + handshake_confirmed_ = true; + NeuterHandshakePackets(); + } } void QuicSentPacketManager::PostProcessNewlyAckedPackets(
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h index 352ca31..cc6f4b9 100644 --- a/quic/core/quic_sent_packet_manager.h +++ b/quic/core/quic_sent_packet_manager.h
@@ -678,6 +678,9 @@ // Latched value of quic_detect_spurious_loss. const bool detect_spurious_losses_; + + // Latched value of quic_neuter_handshake_packets_once. + const bool neuter_handshake_packets_once_; }; } // namespace quic