| 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();
|
| }
|
| }
|
|
|