Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(971)

Unified Diff: net/quic/quic_packet_generator.cc

Issue 341083007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index 952bdc266df9333e60e425f012cd2d2e72a6bcb6..9e7473ebbf06fd39f9cd6ad85daac74f02d86509 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -97,7 +97,11 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(QuicStreamId id,
FecProtection fec_protection,
QuicAckNotifier* notifier) {
IsHandshake handshake = id == kCryptoStreamId ? IS_HANDSHAKE : NOT_HANDSHAKE;
- SendQueuedFrames(false);
+ // To make reasoning about crypto frames easier, we don't combine them with
+ // other retransmittable frames in a single packet.
+ const bool flush = handshake == IS_HANDSHAKE &&
+ packet_creator_.HasPendingRetransmittableFrames();
+ SendQueuedFrames(flush);
size_t total_bytes_consumed = 0;
bool fin_consumed = false;
@@ -155,6 +159,11 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(QuicStreamId id,
}
}
+ // Don't allow the handshake to be bundled with other retransmittable frames.
+ if (handshake == IS_HANDSHAKE) {
+ SendQueuedFrames(true);
+ }
+
// Try to close FEC group since we've either run out of data to send or we're
// blocked. If not in batch mode, force close the group.
MaybeSendFecPacketAndCloseGroup(!InBatchMode());
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698