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

Unified Diff: net/quic/congestion_control/pacing_sender.cc

Issue 397513002: Fix a newly introduced bug in QUIC's PacingSender where burst_tokens_ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/pacing_sender.cc
diff --git a/net/quic/congestion_control/pacing_sender.cc b/net/quic/congestion_control/pacing_sender.cc
index 405afdaaf204e44669124a3ba12a36efb5f0b928..14a72e5de595164061d324f7c6e4005241877f86 100644
--- a/net/quic/congestion_control/pacing_sender.cc
+++ b/net/quic/congestion_control/pacing_sender.cc
@@ -41,10 +41,6 @@ void PacingSender::OnCongestionEvent(bool rtt_updated,
if (rtt_updated) {
has_valid_rtt_ = true;
}
- if (bytes_in_flight == 0) {
- // Add more burst tokens anytime the connection is entering quiescence.
- burst_tokens_ = initial_packet_burst_;
- }
sender_->OnCongestionEvent(
rtt_updated, bytes_in_flight, acked_packets, lost_packets);
}
@@ -121,6 +117,10 @@ QuicTime::Delta PacingSender::TimeUntilSend(
// Don't pace if we don't have an updated RTT estimate.
return time_until_send;
}
+ if (bytes_in_flight == 0) {
+ // Add more burst tokens anytime the connection is entering quiescence.
+ burst_tokens_ = initial_packet_burst_;
+ }
if (burst_tokens_ > 0) {
// Don't pace if we have burst tokens available.
return time_until_send;
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698