Index: net/quic/quic_spdy_stream.cc |
diff --git a/net/quic/quic_spdy_stream.cc b/net/quic/quic_spdy_stream.cc |
index 746e96a8841bc36c0fa0d1253b8a3680f1c79d2e..6a835f81379361073498f9f5c26d78184d223b20 100644 |
--- a/net/quic/quic_spdy_stream.cc |
+++ b/net/quic/quic_spdy_stream.cc |
@@ -14,6 +14,10 @@ using std::min; |
namespace net { |
+#define ENDPOINT \ |
+ (session()->perspective() == Perspective::IS_SERVER ? "Server: " : "Client:" \ |
+ " ") |
+ |
namespace { |
// This is somewhat arbitrary. It's possible, but unlikely, we will either fail |
@@ -38,6 +42,18 @@ QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session) |
QuicSpdyStream::~QuicSpdyStream() {} |
+void QuicSpdyStream::CloseWriteSide() { |
+ if (version() > QUIC_VERSION_28 && !fin_received() && !rst_received() && |
+ sequencer()->ignore_read_data() && !rst_sent()) { |
+ DCHECK(fin_sent()); |
+ // Tell the peer to stop sending further data. |
+ DVLOG(1) << ENDPOINT << "Send QUIC_STREAM_NO_ERROR on stream " << id(); |
+ Reset(QUIC_STREAM_NO_ERROR); |
+ } |
+ |
+ ReliableQuicStream::CloseWriteSide(); |
+} |
+ |
size_t QuicSpdyStream::WriteHeaders( |
const SpdyHeaderBlock& header_block, |
bool fin, |