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

Unified Diff: net/tools/quic/quic_spdy_server_stream_base.cc

Issue 2746443003: move StopReading() from QuicSpdyStream to QuicSpdyServerStreamBase because this is server side feat… (Closed)
Patch Set: Created 3 years, 9 months 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/tools/quic/quic_spdy_server_stream_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_spdy_server_stream_base.cc
diff --git a/net/tools/quic/quic_spdy_server_stream_base.cc b/net/tools/quic/quic_spdy_server_stream_base.cc
index e84516899b5be4a0272b602ed52471b93a14a8a4..f7af8734b511c350e49defccad0640aa526d1766 100644
--- a/net/tools/quic/quic_spdy_server_stream_base.cc
+++ b/net/tools/quic/quic_spdy_server_stream_base.cc
@@ -20,11 +20,22 @@ void QuicSpdyServerStreamBase::CloseWriteSide() {
// or RST.
DCHECK(fin_sent());
// Tell the peer to stop sending further data.
- QUIC_DVLOG(0) << " Server: Send QUIC_STREAM_NO_ERROR on stream " << id();
+ QUIC_DVLOG(1) << " Server: Send QUIC_STREAM_NO_ERROR on stream " << id();
Reset(QUIC_STREAM_NO_ERROR);
}
QuicSpdyStream::CloseWriteSide();
}
+void QuicSpdyServerStreamBase::StopReading() {
+ if (!fin_received() && !rst_received() && write_side_closed() &&
+ !rst_sent()) {
+ DCHECK(fin_sent());
+ // Tell the peer to stop sending further data.
+ QUIC_DVLOG(1) << " Server: Send QUIC_STREAM_NO_ERROR on stream " << id();
+ Reset(QUIC_STREAM_NO_ERROR);
+ }
+ QuicSpdyStream::StopReading();
+}
+
} // namespace net
« no previous file with comments | « net/tools/quic/quic_spdy_server_stream_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698