| Index: net/quic/quic_connection.cc
|
| diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
|
| index c36010b4604aca2d846687d755b364a30a619974..7b9a6b3a5f414d2755264e1c363f789a2191465c 100644
|
| --- a/net/quic/quic_connection.cc
|
| +++ b/net/quic/quic_connection.cc
|
| @@ -949,15 +949,8 @@ void QuicConnection::MaybeSendInResponseToPacket() {
|
|
|
| // Now that we have received an ack, we might be able to send packets which
|
| // are queued locally, or drain streams which are blocked.
|
| - QuicTime::Delta delay = sent_packet_manager_.TimeUntilSend(
|
| - time_of_last_received_packet_, NOT_RETRANSMISSION,
|
| - HAS_RETRANSMITTABLE_DATA);
|
| - if (delay.IsZero()) {
|
| - send_alarm_->Cancel();
|
| - WriteIfNotBlocked();
|
| - } else if (!delay.IsInfinite()) {
|
| - send_alarm_->Cancel();
|
| - send_alarm_->Set(time_of_last_received_packet_.Add(delay));
|
| + if (CanWrite(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA)) {
|
| + OnCanWrite();
|
| }
|
| }
|
|
|
| @@ -1298,15 +1291,7 @@ bool QuicConnection::CanWrite(TransmissionType transmission_type,
|
| return false;
|
| }
|
|
|
| - // TODO(rch): consider removing this check so that if an ACK comes in
|
| - // before the alarm goes it, we might be able send out a packet.
|
| - // This check assumes that if the send alarm is set, it applies equally to all
|
| - // types of transmissions.
|
| - if (send_alarm_->IsSet()) {
|
| - DVLOG(1) << "Send alarm set. Not sending.";
|
| - return false;
|
| - }
|
| -
|
| + send_alarm_->Cancel();
|
| QuicTime now = clock_->Now();
|
| QuicTime::Delta delay = sent_packet_manager_.TimeUntilSend(
|
| now, transmission_type, retransmittable);
|
| @@ -1316,7 +1301,6 @@ bool QuicConnection::CanWrite(TransmissionType transmission_type,
|
|
|
| // If the scheduler requires a delay, then we can not send this packet now.
|
| if (!delay.IsZero()) {
|
| - send_alarm_->Cancel();
|
| send_alarm_->Set(now.Add(delay));
|
| DVLOG(1) << "Delaying sending.";
|
| return false;
|
|
|