bug 712021 - spdy cancel stream should remove from pending queue r=honzab
authorPatrick McManus <mcmanus@ducksong.com>
Mon, 19 Dec 2011 16:36:26 -0500
changeset 84708 b4d859a1e3386d97a2af75bebaf9d2a3656e9d6e
parent 84707 721897529f74dfed5c5dd5363cd376cc47264943
child 84709 5fe7f595a70ee3c36940034a4e414c8191bb199f
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershonzab
bugs712021
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 712021 - spdy cancel stream should remove from pending queue r=honzab
netwerk/protocol/http/SpdySession.cpp
--- a/netwerk/protocol/http/SpdySession.cpp
+++ b/netwerk/protocol/http/SpdySession.cpp
@@ -739,16 +739,25 @@ SpdySession::CleanupStream(SpdyStream *a
   // This should also be short.
   size = mUrgentForWrite.GetSize();
   for (PRUint32 count = 0; count < size; ++count) {
     SpdyStream *stream = static_cast<SpdyStream *>(mUrgentForWrite.PopFront());
     if (stream != aStream)
       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<SpdyStream *>(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());
 
   // Send the stream the close() indication
   aStream->Close(aResult);
 
   // removing from the stream transaction hash will