Index: net/quic/quic_sent_packet_manager.cc |
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc |
index 0c63614055b5b5219e85dbec0bf2ab8372b730b0..d46ffb98e170e8f266e9be008fa5ea3d4edf7b15 100644 |
--- a/net/quic/quic_sent_packet_manager.cc |
+++ b/net/quic/quic_sent_packet_manager.cc |
@@ -284,30 +284,13 @@ void QuicSentPacketManager::ClearPreviousRetransmissions(size_t num_to_clear) { |
UnackedPacketMap::iterator it = unacked_packets_.begin(); |
while (it != unacked_packets_.end() && num_to_clear > 0) { |
QuicPacketSequenceNumber sequence_number = it->first; |
- // If this is not a previous transmission then there is no point |
- // in clearing out any further packets, because it will not affect |
- // the high water mark. |
- SequenceNumberSet* all_transmissions = it->second.all_transmissions; |
- if (all_transmissions->size() == 1) { |
- if (it->second.retransmittable_frames == NULL) { |
- // This is a current transmission, but a previous transmission has |
- // been acked, so it's safe to remove. |
- it = MarkPacketHandled(sequence_number, NOT_RECEIVED_BY_PEER); |
- --num_to_clear; |
- continue; |
- } |
- break; |
- } |
- QuicPacketSequenceNumber newest_transmission = *all_transmissions->rbegin(); |
- if (sequence_number == newest_transmission) { |
- break; |
- } |
- if (it->second.pending) { |
+ // If this is a pending packet, or has retransmittable data, then there is |
+ // no point in clearing out any further packets, because they would not |
+ // affect the high water mark. |
+ if (it->second.pending || it->second.retransmittable_frames != NULL) { |
break; |
} |
- DCHECK(it->second.retransmittable_frames == NULL); |
- DCHECK_LT(1u, all_transmissions->size()); |
++it; |
RemovePacket(sequence_number); |
--num_to_clear; |