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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 2065463002: Always send queued retransmission packets, because of write blocked socket, once the socket gets un… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 QuicTime sent_time, 558 QuicTime sent_time,
559 TransmissionType transmission_type, 559 TransmissionType transmission_type,
560 HasRetransmittableData has_retransmittable_data) { 560 HasRetransmittableData has_retransmittable_data) {
561 QuicPacketNumber packet_number = serialized_packet->packet_number; 561 QuicPacketNumber packet_number = serialized_packet->packet_number;
562 DCHECK_LT(0u, packet_number); 562 DCHECK_LT(0u, packet_number);
563 DCHECK(!unacked_packets_.IsUnacked(packet_number)); 563 DCHECK(!unacked_packets_.IsUnacked(packet_number));
564 QUIC_BUG_IF(serialized_packet->encrypted_length == 0) 564 QUIC_BUG_IF(serialized_packet->encrypted_length == 0)
565 << "Cannot send empty packets."; 565 << "Cannot send empty packets.";
566 566
567 if (delegate_ == nullptr && original_packet_number != 0) { 567 if (delegate_ == nullptr && original_packet_number != 0) {
568 if (!pending_retransmissions_.erase(original_packet_number)) { 568 if (!pending_retransmissions_.erase(original_packet_number) &&
569 !FLAGS_quic_always_write_queued_retransmissions) {
569 QUIC_BUG << "Expected packet number to be in " 570 QUIC_BUG << "Expected packet number to be in "
570 << "pending_retransmissions_. packet_number: " 571 << "pending_retransmissions_. packet_number: "
571 << original_packet_number; 572 << original_packet_number;
572 } 573 }
573 } 574 }
574 575
575 if (pending_timer_transmission_count_ > 0) { 576 if (pending_timer_transmission_count_ > 0) {
576 --pending_timer_transmission_count_; 577 --pending_timer_transmission_count_;
577 } 578 }
578 579
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( 1003 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo(
1003 QuicPacketNumber packet_number) { 1004 QuicPacketNumber packet_number) {
1004 return unacked_packets_.GetMutableTransmissionInfo(packet_number); 1005 return unacked_packets_.GetMutableTransmissionInfo(packet_number);
1005 } 1006 }
1006 1007
1007 void QuicSentPacketManager::RemoveObsoletePackets() { 1008 void QuicSentPacketManager::RemoveObsoletePackets() {
1008 unacked_packets_.RemoveObsoletePackets(); 1009 unacked_packets_.RemoveObsoletePackets();
1009 } 1010 }
1010 1011
1011 } // namespace net 1012 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698