Check has_handshake in quicpacketcreator::consumedata rather than delegate to shouldgeneratepacket. no functional change, not flag protected.
PiperOrigin-RevId: 313176405
Change-Id: Ic8bd562979eb5774247539fdbd20b41d367bf3cd
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index a91d264..d364ed3 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -1231,9 +1231,9 @@
write_length - total_bytes_consumed > kMaxOutgoingPacketSize &&
latched_hard_max_packet_length_ == 0;
- while (!run_fast_path && delegate_->ShouldGeneratePacket(
- HAS_RETRANSMITTABLE_DATA,
- has_handshake ? IS_HANDSHAKE : NOT_HANDSHAKE)) {
+ while (!run_fast_path &&
+ (has_handshake || delegate_->ShouldGeneratePacket(
+ HAS_RETRANSMITTABLE_DATA, NOT_HANDSHAKE))) {
QuicFrame frame;
bool needs_full_padding =
has_handshake && fully_pad_crypto_handshake_packets_;