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

Unified Diff: net/quic/quic_connection.cc

Issue 1531543004: Fix a bug protected by gfe2_reloadable_flag_quic_respect_send_alarm where acks would not be sent im… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110021608
Patch Set: Created 5 years 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/tcp_cubic_sender.cc ('k') | net/quic/quic_connection_test.cc » ('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 da8305f42bd488d7e8f9c71e88418ec6a736bcbf..4a1305768dbdec37654fa7204e99bf77fdd33f3f 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -710,7 +710,7 @@ bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) {
return false;
}
- if (FLAGS_quic_respect_send_alarm && send_alarm_->IsSet()) {
+ if (FLAGS_quic_respect_send_alarm2 && send_alarm_->IsSet()) {
send_alarm_->Cancel();
}
ProcessAckFrame(incoming_ack);
@@ -1511,9 +1511,17 @@ bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) {
return false;
}
- // If the send alarm is set, wait for it to fire.
- if (FLAGS_quic_respect_send_alarm && send_alarm_->IsSet()) {
- return false;
+ if (FLAGS_quic_respect_send_alarm2) {
+ // Allow acks to be sent immediately.
+ // TODO(ianswett): Remove retransmittable from
+ // SendAlgorithmInterface::TimeUntilSend.
+ if (retransmittable == NO_RETRANSMITTABLE_DATA) {
+ return true;
+ }
+ // If the send alarm is set, wait for it to fire.
+ if (send_alarm_->IsSet()) {
+ return false;
+ }
}
QuicTime now = clock_->Now();
@@ -1531,7 +1539,7 @@ bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) {
<< "ms";
return false;
}
- if (!FLAGS_quic_respect_send_alarm) {
+ if (!FLAGS_quic_respect_send_alarm2) {
send_alarm_->Cancel();
}
return true;
@@ -2266,7 +2274,8 @@ QuicConnection::ScopedPacketBundler::ScopedPacketBundler(
connection_->ack_alarm_->IsSet() || connection_->stop_waiting_count_ > 1;
if (send_ack == SEND_ACK || (send_ack == BUNDLE_PENDING_ACK && ack_pending)) {
DVLOG(1) << "Bundling ack with outgoing packet.";
- DCHECK(send_ack == SEND_ACK || connection_->ack_frame_updated());
+ DCHECK(send_ack == SEND_ACK || connection_->ack_frame_updated() ||
+ connection_->stop_waiting_count_ > 1);
connection_->SendAck();
}
}
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698