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 770d6ca2d09e6d76518f6256b409a5e0da101b96..7951e62f14aba90826978317f201336f9fe6c47d 100644 |
--- a/net/quic/quic_sent_packet_manager.cc |
+++ b/net/quic/quic_sent_packet_manager.cc |
@@ -567,8 +567,6 @@ void QuicSentPacketManager::OnPacketSent( |
} |
void QuicSentPacketManager::OnRetransmissionTimeout() { |
- ++consecutive_rto_count_; |
- send_algorithm_->OnRetransmissionTimeout(); |
// Abandon all pending packets to ensure the congestion window |
// opens up before we attempt to retransmit packets. |
for (SequenceNumberSet::const_iterator it = pending_packets_.begin(); |
@@ -587,12 +585,20 @@ void QuicSentPacketManager::OnRetransmissionTimeout() { |
<< unacked_packets_.size() << " unacked packets."; |
// Retransmit any packet with retransmittable frames. |
+ bool packets_retransmitted = false; |
for (UnackedPacketMap::const_iterator it = unacked_packets_.begin(); |
it != unacked_packets_.end(); ++it) { |
if (it->second.retransmittable_frames != NULL) { |
+ packets_retransmitted = true; |
MarkForRetransmission(it->first, RTO_RETRANSMISSION); |
} |
} |
+ |
+ // Only inform the sent packet manager of an RTO if data was retransmitted. |
+ if (packets_retransmitted) { |
+ ++consecutive_rto_count_; |
+ send_algorithm_->OnRetransmissionTimeout(); |
+ } |
} |
QuicTime QuicSentPacketManager::OnAbandonFecTimeout() { |