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

Unified Diff: net/quic/quic_connection.cc

Issue 1439653002: Not sending QUIC packets if the send alarm is set. Behind FLAGS_respect_send_alarm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107277639
Patch Set: Disable flag Created 5 years, 1 month 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 | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 0fa6eafe0d496e3225cf3e0c3dbc16fc566d8b89..79d5131aa5ee8eca2253810e31225aebd3e0ed46 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1474,6 +1474,11 @@ bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) {
return false;
}
+ // If the send alarm is set, wait for it to fire.
+ if (FLAGS_respect_send_alarm && send_alarm_->IsSet()) {
+ return false;
+ }
+
QuicTime now = clock_->Now();
QuicTime::Delta delay = sent_packet_manager_.TimeUntilSend(
now, retransmittable);
@@ -1489,7 +1494,9 @@ bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) {
<< "ms";
return false;
}
- send_alarm_->Cancel();
+ if (!FLAGS_respect_send_alarm) {
+ send_alarm_->Cancel();
+ }
return true;
}
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698