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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 return false; 1608 return false;
1609 } 1609 }
1610 delete packet->serialized_packet.retransmittable_frames; 1610 delete packet->serialized_packet.retransmittable_frames;
1611 delete packet->serialized_packet.packet; 1611 delete packet->serialized_packet.packet;
1612 packet->serialized_packet.retransmittable_frames = nullptr; 1612 packet->serialized_packet.retransmittable_frames = nullptr;
1613 packet->serialized_packet.packet = nullptr; 1613 packet->serialized_packet.packet = nullptr;
1614 return true; 1614 return true;
1615 } 1615 }
1616 1616
1617 bool QuicConnection::WritePacketInner(QueuedPacket* packet) { 1617 bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
1618 if (FLAGS_quic_close_connection_out_of_order_sending &&
1619 packet->serialized_packet.packet_number <
1620 sent_packet_manager_.largest_sent_packet()) {
1621 LOG(DFATAL) << "Attempt to write packet:"
1622 << packet->serialized_packet.packet_number
1623 << " after:" << sent_packet_manager_.largest_sent_packet();
1624 SendConnectionCloseWithDetails(QUIC_INTERNAL_ERROR,
1625 "Packet written out of order.");
1626 return true;
1627 }
1618 if (ShouldDiscardPacket(*packet)) { 1628 if (ShouldDiscardPacket(*packet)) {
1619 ++stats_.packets_discarded; 1629 ++stats_.packets_discarded;
1620 return true; 1630 return true;
1621 } 1631 }
1622 // Connection close packets are encrypted and saved, so don't exit early. 1632 // Connection close packets are encrypted and saved, so don't exit early.
1623 const bool is_connection_close = IsConnectionClose(*packet); 1633 const bool is_connection_close = IsConnectionClose(*packet);
1624 if (writer_->IsWriteBlocked() && !is_connection_close) { 1634 if (writer_->IsWriteBlocked() && !is_connection_close) {
1625 return false; 1635 return false;
1626 } 1636 }
1627 1637
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; 2406 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1;
2397 ++mtu_probe_count_; 2407 ++mtu_probe_count_;
2398 2408
2399 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; 2409 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_;
2400 SendMtuDiscoveryPacket(mtu_discovery_target_); 2410 SendMtuDiscoveryPacket(mtu_discovery_target_);
2401 2411
2402 DCHECK(!mtu_discovery_alarm_->IsSet()); 2412 DCHECK(!mtu_discovery_alarm_->IsSet());
2403 } 2413 }
2404 2414
2405 } // namespace net 2415 } // namespace net
OLDNEW
« 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