Bug 1240025 - incorrect close state on pushed stream r=hurley, a=lizzard
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 10 Feb 2016 14:54:32 -0500
changeset 304009 2156013433dcf3f1b500f039053dbb7a9dea422a
parent 304008 e68ef0c5229255db653870e7e816280b6a52c943
child 304010 0c2abe0921d469c565eb896b5af734a3e5c0932a
push id9082
push usercbook@mozilla.com
push dateWed, 17 Feb 2016 15:12:23 +0000
treeherdermozilla-aurora@ab741ea51982 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley, lizzard
bugs1240025
milestone46.0a2
Bug 1240025 - incorrect close state on pushed stream r=hurley, a=lizzard
netwerk/protocol/http/Http2Session.cpp
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -1029,18 +1029,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();