Bug 1240025 - incorrect close state on pushed stream r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 10 Feb 2016 14:54:32 -0500
changeset 284020 4f7533b147a9f9febb1ed41584a796f6003db413
parent 284019 38c1ad601053d62f66865b9d40c19ab406b67619
child 284021 78fe845914c0c5e13e34759487301c0a6f270eef
push id29995
push usercbook@mozilla.com
push dateFri, 12 Feb 2016 14:16:12 +0000
treeherdermozilla-central@218d16a9ddcc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1240025
milestone47.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 1240025 - incorrect close state on pushed stream r=hurley
netwerk/protocol/http/Http2Session.cpp
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -1006,18 +1006,20 @@ Http2Session::CleanupStream(Http2Stream 
   if (pushSource) {
     // aStream is a synthetic  attached to an even push
     MOZ_ASSERT(pushSource->GetConsumerStream() == aStream);
     MOZ_ASSERT(!aStream->StreamID());
     MOZ_ASSERT(!(pushSource->StreamID() & 0x1));
     pushSource->SetConsumerStream(nullptr);
   }
 
-  if (!aStream->RecvdFin() && !aStream->RecvdReset() && aStream->StreamID()) {
-    LOG3(("Stream had not processed recv FIN, sending RST code %X\n", aResetCode));
+  // don't reset a stream that has recevied a fin or rst
+  if (!aStream->RecvdFin() && !aStream->RecvdReset() && aStream->StreamID() &&
+      !(mInputFrameFinal && (aStream == mInputFrameDataStream))) { // !(recvdfin with mark pending)
+    LOG3(("Stream 0x%X had not processed recv FIN, sending RST code %X\n", aStream->StreamID(), aResetCode));
     GenerateRstStream(aResetCode, aStream->StreamID());
   }
 
   CloseStream(aStream, aResult);
 
   // Remove the stream from the ID hash table and, if an even id, the pushed
   // table too.
   uint32_t id = aStream->StreamID();