Index: net/quic/core/quic_packet_generator.cc |
diff --git a/net/quic/core/quic_packet_generator.cc b/net/quic/core/quic_packet_generator.cc |
index cb66f1d249d7d8fc2e56a8afbfe770726c88cc4b..ca12d423eaeb5b897b063ac15e9f582e100190d5 100644 |
--- a/net/quic/core/quic_packet_generator.cc |
+++ b/net/quic/core/quic_packet_generator.cc |
@@ -195,25 +195,21 @@ void QuicPacketGenerator::SendQueuedFrames(bool flush) { |
// Only add pending frames if we are SURE we can then send the whole packet. |
while (HasPendingFrames() && |
(flush || CanSendWithNextPendingFrameAddition())) { |
- if (FLAGS_quic_close_connection_on_huge_frames) { |
- bool first_frame = packet_creator_.CanSetMaxPacketLength(); |
- if (!AddNextPendingFrame() && first_frame) { |
- // A single frame cannot fit into the packet, tear down the connection. |
- QUIC_BUG << "A single frame cannot fit into packet." |
- << " should_send_ack: " << should_send_ack_ |
- << " should_send_stop_waiting: " << should_send_stop_waiting_ |
- << " number of queued_control_frames: " |
- << queued_control_frames_.size(); |
- if (!queued_control_frames_.empty()) { |
- DVLOG(1) << queued_control_frames_[0]; |
- } |
- delegate_->OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET, |
- "Single frame cannot fit into a packet", |
- ConnectionCloseSource::FROM_SELF); |
- return; |
+ bool first_frame = packet_creator_.CanSetMaxPacketLength(); |
+ if (!AddNextPendingFrame() && first_frame) { |
+ // A single frame cannot fit into the packet, tear down the connection. |
+ QUIC_BUG << "A single frame cannot fit into packet." |
+ << " should_send_ack: " << should_send_ack_ |
+ << " should_send_stop_waiting: " << should_send_stop_waiting_ |
+ << " number of queued_control_frames: " |
+ << queued_control_frames_.size(); |
+ if (!queued_control_frames_.empty()) { |
+ DVLOG(1) << queued_control_frames_[0]; |
} |
- } else { |
- AddNextPendingFrame(); |
+ delegate_->OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET, |
+ "Single frame cannot fit into a packet", |
+ ConnectionCloseSource::FROM_SELF); |
+ return; |
} |
} |
if (flush || !InBatchMode()) { |