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

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 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
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 a07de8b3a8b890f5f535de7bff141487aa91fd7c..185d995b1d2c0bbd43cd067591fa0fd8c3b3a1a3 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -80,8 +80,13 @@ void QuicUnackedPacketMap::OnRetransmittedPacket(
*(++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);
+ TransmissionInfo* old_transmission_info =
+ FindOrNull(unacked_packets_, old_transmission);
+ // Don't remove old packets if they're still in flight.
+ if (old_transmission_info == NULL || !old_transmission_info->in_flight) {
+ transmission_info->all_transmissions->erase(old_transmission);
+ unacked_packets_.erase(old_transmission);
+ }
}
unacked_packets_[new_sequence_number] =
TransmissionInfo(frames,

Powered by Google App Engine
This is Rietveld 408576698