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

Unified Diff: net/quic/core/quic_sent_packet_manager.cc

Issue 2393933002: Move the logic from SendAlgorithmInterface::RetransmissionDelay() into QuicSentPacketManager, becau… (Closed)
Patch Set: Created 4 years, 2 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/core/quic_connection_test.cc ('k') | net/quic/core/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/core/quic_sent_packet_manager.cc
diff --git a/net/quic/core/quic_sent_packet_manager.cc b/net/quic/core/quic_sent_packet_manager.cc
index 89a1dc5ffa23bff721d4264aed7cb9ed18a9b8b5..c38db4c754877cab3dfe28698576ab3faa1016e1 100644
--- a/net/quic/core/quic_sent_packet_manager.cc
+++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -859,14 +859,18 @@ const QuicTime::Delta QuicSentPacketManager::GetTailLossProbeDelay() const {
}
const QuicTime::Delta QuicSentPacketManager::GetRetransmissionDelay() const {
- QuicTime::Delta retransmission_delay = send_algorithm_->RetransmissionDelay();
- if (retransmission_delay.IsZero()) {
+ QuicTime::Delta retransmission_delay = QuicTime::Delta::Zero();
+ if (rtt_stats_.smoothed_rtt().IsZero()) {
// We are in the initial state, use default timeout values.
retransmission_delay =
QuicTime::Delta::FromMilliseconds(kDefaultRetransmissionTimeMs);
- } else if (retransmission_delay.ToMilliseconds() < kMinRetransmissionTimeMs) {
+ } else {
retransmission_delay =
- QuicTime::Delta::FromMilliseconds(kMinRetransmissionTimeMs);
+ rtt_stats_.smoothed_rtt() + 4 * rtt_stats_.mean_deviation();
+ if (retransmission_delay.ToMilliseconds() < kMinRetransmissionTimeMs) {
+ retransmission_delay =
+ QuicTime::Delta::FromMilliseconds(kMinRetransmissionTimeMs);
+ }
}
// Calculate exponential back off.
@@ -958,7 +962,6 @@ void QuicSentPacketManager::OnConnectionMigration(QuicPathId,
send_algorithm_->OnConnectionMigration();
}
-
void QuicSentPacketManager::SetDebugDelegate(DebugDelegate* debug_delegate) {
debug_delegate_ = debug_delegate;
}
« no previous file with comments | « net/quic/core/quic_connection_test.cc ('k') | net/quic/core/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698