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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 1665303003: Adds plumbing for QUIC early connection migration. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Created 4 years, 10 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 5f0474cea8a3e7735c73f52da45009f84f243dd4..f1b4f5fbaa4e40840b4825ba98a5b9e2afbf0032 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -37,6 +37,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.
@@ -619,6 +621,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;
}
}
« 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