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

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 5 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_time.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_unacked_packet_map.cc
diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
index 563b53dfe92d1da8dd141d729b36def31d342aa4..a07de8b3a8b890f5f535de7bff141487aa91fd7c 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -74,6 +74,15 @@ void QuicUnackedPacketMap::OnRetransmittedPacket(
// We keep the old packet in the unacked packet list until it, or one of
// the retransmissions of it are acked.
transmission_info->retransmittable_frames = NULL;
+ // Only keep one transmission older than largest observed, because only the
+ // most recent is expected to possibly be a spurious retransmission.
+ if (transmission_info->all_transmissions->size() > 1 &&
+ *(++transmission_info->all_transmissions->begin()) < largest_observed_) {
+ QuicPacketSequenceNumber old_transmission =
+ *transmission_info->all_transmissions->begin();
+ transmission_info->all_transmissions->erase(old_transmission);
+ unacked_packets_.erase(old_transmission);
+ }
unacked_packets_[new_sequence_number] =
TransmissionInfo(frames,
new_sequence_number,
« no previous file with comments | « net/quic/quic_time.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698