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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1613513003: Early connection migration in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Typo fixed. Created 4 years, 11 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_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index c8b01dabfcc97b59169b9daeb2110b3e6c4d07c0..8ba3f5b9c32a4ad8cfc68479ab5e3fc8bc027b22 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -36,6 +36,8 @@ static const int64_t kMaxRetransmissionTimeMs = 60000;
static const size_t kMaxRetransmissions = 10;
// Maximum number of packets retransmitted upon an RTO.
static const size_t kMaxRetransmissionsOnTimeout = 2;
+// Minimum number of consecutive RTOs before path is considered to be degrading.
+const size_t kMinTimeoutsBeforePathDegrading = 2;
// Ensure the handshake timer isnt't faster than 10ms.
// This limits the tenth retransmitted packet to 10s after the initial CHLO.
@@ -622,6 +624,10 @@ void QuicSentPacketManager::OnRetransmissionTimeout() {
case RTO_MODE:
++stats_->rto_count;
RetransmitRtoPackets();
+ if (network_change_visitor_ != nullptr &&
+ consecutive_rto_count_ == kMinTimeoutsBeforePathDegrading) {
+ network_change_visitor_->OnPathDegrading();
+ }
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698