From 884efe0b345c951bb43caea0b39f2ae29e84d020 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Mon, 19 Dec 2011 16:36:26 -0500 Subject: [PATCH] bug 712021 - spdy cancel stream should remove from pending queue r=honzab --- netwerk/protocol/http/SpdySession.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/netwerk/protocol/http/SpdySession.cpp b/netwerk/protocol/http/SpdySession.cpp index 58e777eebe3..b9b880718e3 100644 --- a/netwerk/protocol/http/SpdySession.cpp +++ b/netwerk/protocol/http/SpdySession.cpp @@ -744,6 +744,15 @@ SpdySession::CleanupStream(SpdyStream *aStream, nsresult aResult) mUrgentForWrite.Push(stream); } + // Check the streams queued for activation. Because we normally accept a high + // level of parallelization this should also be short. + size = mQueuedStreams.GetSize(); + for (PRUint32 count = 0; count < size; ++count) { + SpdyStream *stream = static_cast(mQueuedStreams.PopFront()); + if (stream != aStream) + mQueuedStreams.Push(stream); + } + // Remove the stream from the ID hash table. (this one isn't short, which is // why it is hashed.) mStreamIDHash.Remove(aStream->StreamID());