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

Unified Diff: net/quic/quic_connection.cc

Issue 1304833006: relnote: Close the QUIC connection when a packet is about to be sent out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Deprecate_quic_dont_write_when_flow_unblocked_101389540
Patch Set: Created 5 years, 3 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 | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index f663111c2cdaf13369d6d438ac02004586c5511f..682a0a556d35b1a296def180be80da4b9156fb51 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1615,6 +1615,16 @@ bool QuicConnection::WritePacket(QueuedPacket* packet) {
}
bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
+ if (FLAGS_quic_close_connection_out_of_order_sending &&
+ packet->serialized_packet.packet_number <
+ sent_packet_manager_.largest_sent_packet()) {
+ LOG(DFATAL) << "Attempt to write packet:"
+ << packet->serialized_packet.packet_number
+ << " after:" << sent_packet_manager_.largest_sent_packet();
+ SendConnectionCloseWithDetails(QUIC_INTERNAL_ERROR,
+ "Packet written out of order.");
+ return true;
+ }
if (ShouldDiscardPacket(*packet)) {
++stats_.packets_discarded;
return true;
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698