From f682f1d4f7b033c5a783426d87da5607a55cd2d5 Mon Sep 17 00:00:00 2001 From: "agayev@chromium.org" Date: Tue, 27 Jul 2010 13:57:31 +0000 Subject: 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 --- net/spdy/spdy_stream.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'net/spdy/spdy_stream.cc') 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) -- cgit v1.1