| Index: net/quic/quic_connection.cc
|
| diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
|
| index 497aa929e30c06fe54cfab1ae7825b9b7650c8b6..49d6af61380853cd5a6a814d24a3f4cfe9251145 100644
|
| --- a/net/quic/quic_connection.cc
|
| +++ b/net/quic/quic_connection.cc
|
| @@ -1562,6 +1562,21 @@ bool QuicConnection::HasQueuedData() const {
|
| !queued_packets_.empty() || packet_generator_.HasQueuedFrames();
|
| }
|
|
|
| +bool QuicConnection::CanWriteStreamData() {
|
| + if (HasQueuedData()) {
|
| + return false;
|
| + }
|
| +
|
| + IsHandshake pending_handshake = visitor_->HasPendingHandshake() ?
|
| + IS_HANDSHAKE : NOT_HANDSHAKE;
|
| + // Sending queued packets may have caused the socket to become write blocked,
|
| + // or the congestion manager to prohibit sending. If we've sent everything
|
| + // we had queued and we're still not blocked, let the visitor know it can
|
| + // write more.
|
| + return ShouldGeneratePacket(NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA,
|
| + pending_handshake);
|
| +}
|
| +
|
| void QuicConnection::SetIdleNetworkTimeout(QuicTime::Delta timeout) {
|
| if (timeout < idle_network_timeout_) {
|
| idle_network_timeout_ = timeout;
|
|
|