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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 287583002: Revert of Fix a bug where if a crypto packet is spuriously retransmitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0bc3af5ca1d8523e9fec8ff9928e135c3b36b2f6..18d8997ebcfee03492694d2912dbaff146b96a07 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -251,19 +251,21 @@ void QuicSentPacketManager::RetransmitUnackedPackets(
}
}
-void QuicSentPacketManager::DiscardUnencryptedPackets() {
+void QuicSentPacketManager::NeuterUnencryptedPackets() {
QuicUnackedPacketMap::const_iterator unacked_it = unacked_packets_.begin();
while (unacked_it != unacked_packets_.end()) {
const RetransmittableFrames* frames =
unacked_it->second.retransmittable_frames;
if (frames != NULL && frames->encryption_level() == ENCRYPTION_NONE) {
- // Once you're forward secure, no unencrypted packets will be sent.
- // Additionally, it's likely the peer will be forward secure, and no acks
- // for these packets will be received, so mark the packet as handled.
+ // Since once you're forward secure, no unencrypted packets will be sent,
+ // crypto or otherwise. Unencrypted packets are neutered and abandoned, to
+ // ensure they are not retransmitted or considered lost from a congestion
+ // control perspective.
pending_retransmissions_.erase(unacked_it->first);
- unacked_it = MarkPacketHandled(unacked_it->first,
- QuicTime::Delta::Zero());
- continue;
+ // TODO(ianswett): This may cause packets to linger forever in the
+ // UnackedPacketMap.
+ unacked_packets_.NeuterPacket(unacked_it->first);
+ unacked_packets_.SetNotPending(unacked_it->first);
}
++unacked_it;
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698