diff options
author | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 13:57:31 +0000 |
---|---|---|
committer | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 13:57:31 +0000 |
commit | f682f1d4f7b033c5a783426d87da5607a55cd2d5 (patch) | |
tree | cb8127dcbefb5227d39b6bec741a9b0e74e88d87 /net/spdy/spdy_stream.cc | |
parent | 1fec6435d5d98e899515a394b087236b729235f2 (diff) | |
download | chromium_src-f682f1d4f7b033c5a783426d87da5607a55cd2d5.zip chromium_src-f682f1d4f7b033c5a783426d87da5607a55cd2d5.tar.gz chromium_src-f682f1d4f7b033c5a783426d87da5607a55cd2d5.tar.bz2 |
Fix DeleteStream() being called twice per stream and CloseStream() reporting a wrong stream number.
BUG=49683
TEST=None
Review URL: http://codereview.chromium.org/3035015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.cc')
-rw-r--r-- | net/spdy/spdy_stream.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc index 1de67f2..72a1a4f 100644 --- a/net/spdy/spdy_stream.cc +++ b/net/spdy/spdy_stream.cc @@ -32,11 +32,6 @@ SpdyStream::SpdyStream( SpdyStream::~SpdyStream() { DLOG(INFO) << "Deleting SpdyStream for stream " << stream_id_; - - // When the stream_id_ is 0, we expect that it is because - // we've cancelled or closed the stream and set the stream_id to 0. - if (!stream_id_) - DCHECK(response_complete_); } void SpdyStream::SetDelegate(Delegate* delegate) { @@ -58,7 +53,7 @@ void SpdyStream::SetDelegate(Delegate* delegate) { void SpdyStream::DetachDelegate() { delegate_ = NULL; - if (!cancelled()) + if (!response_complete_ && !cancelled()) Cancel(); } @@ -214,7 +209,6 @@ void SpdyStream::OnWriteComplete(int status) { void SpdyStream::OnClose(int status) { response_complete_ = true; response_status_ = status; - stream_id_ = 0; Delegate* delegate = delegate_; delegate_ = NULL; if (delegate) |