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 7978fedc82c100361bc326d7b7fd61364ca45cfe..142871ef597822975e52fb2bf0079a8c1d801985 100644 |
--- a/net/quic/quic_sent_packet_manager.cc |
+++ b/net/quic/quic_sent_packet_manager.cc |
@@ -163,6 +163,11 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) { |
} |
} |
+void QuicSentPacketManager::ResumeConnectionState( |
+ const CachedNetworkParameters& cached_network_params) { |
+ send_algorithm_->ResumeConnectionState(cached_network_params); |
+} |
+ |
void QuicSentPacketManager::SetNumOpenStreams(size_t num_streams) { |
if (n_connection_simulation_) { |
// Ensure the number of connections is between 1 and 5. |
@@ -323,6 +328,9 @@ void QuicSentPacketManager::RetransmitUnackedPackets( |
(retransmission_type == ALL_UNACKED_RETRANSMISSION || |
frames->encryption_level() == ENCRYPTION_INITIAL)) { |
MarkForRetransmission(sequence_number, retransmission_type); |
+ } else if (it->is_fec_packet) { |
+ // Remove FEC packets from the packet map, since we can't retransmit them. |
+ unacked_packets_.RemoveFromInFlight(sequence_number); |
} |
} |
} |
@@ -549,12 +557,18 @@ bool QuicSentPacketManager::OnPacketSent( |
} |
// Only track packets as in flight that the send algorithm wants us to track. |
+ // Since FEC packets should also be counted towards the congestion window, |
+ // consider them as retransmittable for the purposes of congestion control. |
+ HasRetransmittableData has_congestion_controlled_data = |
+ serialized_packet->packet->is_fec_packet() ? |
+ HAS_RETRANSMITTABLE_DATA : has_retransmittable_data; |
const bool in_flight = |
send_algorithm_->OnPacketSent(sent_time, |
unacked_packets_.bytes_in_flight(), |
sequence_number, |
bytes, |
- has_retransmittable_data); |
+ has_congestion_controlled_data); |
+ |
unacked_packets_.AddSentPacket(*serialized_packet, |
original_sequence_number, |
transmission_type, |