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

Unified Diff: net/spdy/spdy_stream.cc

Issue 10829066: Fix a SPDY crash bug where a CHECK() is hit because a cancelled stream is considered active by the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only call CloseCreatedStream when stream_id == 0 Created 8 years, 5 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/spdy/spdy_session_spdy3_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index f3828d63e19ab375c6b53e2e547568f627b2db33..277188662eb1ea68559e2d2178b112b7021ecb15 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -87,6 +87,8 @@ class SpdyStream::SpdyStreamIOBufferProducer
}
virtual SpdyIOBuffer* ProduceNextBuffer(SpdySession* session) OVERRIDE {
+ if (stream_->cancelled())
+ return NULL;
if (stream_->stream_id() == 0)
SpdySession::SpdyIOBufferProducer::ActivateStream(session, stream_);
frame_.reset(stream_->ProduceNextFrame());
@@ -526,6 +528,8 @@ void SpdyStream::Cancel() {
cancelled_ = true;
if (session_->IsStreamActive(stream_id_))
session_->ResetStream(stream_id_, CANCEL, "");
+ else if (stream_id_ == 0)
+ session_->CloseCreatedStream(this, CANCEL);
}
void SpdyStream::Close() {
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698