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

Unified Diff: net/spdy/spdy_stream.cc

Issue 3035015: SPDY: Fix DeleteStream() being called twice and CloseStream() reporting a wrong stream number. (Closed)
Patch Set: merge with trunk -- again Created 10 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 | « no previous file | 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 1de67f22f8b99b9bf6c3a8a5ca05ad0f88f60043..72a1a4f2daac9ad613340d6f3c9b51f5ea9a6986 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698