bug 1072478 - h2 push loses fin bit race condition 1/2 r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Thu, 16 Oct 2014 16:42:14 -0400
changeset 248004 047afa953b9c6c93e2309d156931ab9926622897
parent 248003 ed186e5af4a148cf7a336d1f55e51a036d5c23a4
child 248005 28fff54451dd8df683011bef620b09f9e23588a0
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1072478
milestone37.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 1072478 - h2 push loses fin bit race condition 1/2 r=hurley
netwerk/protocol/http/Http2Push.cpp
netwerk/protocol/http/SpdyPush31.cpp
--- a/netwerk/protocol/http/Http2Push.cpp
+++ b/netwerk/protocol/http/Http2Push.cpp
@@ -348,23 +348,23 @@ Http2PushTransactionBuffer::WriteSegment
                                        count, countWritten);
   if (NS_SUCCEEDED(rv)) {
     mBufferedHTTP1Used += *countWritten;
   }
   else if (rv == NS_BASE_STREAM_CLOSED) {
     mIsDone = true;
   }
 
-  if (Available()) {
+  if (Available() || mIsDone) {
     Http2Stream *consumer = mPushStream->GetConsumerStream();
 
     if (consumer) {
       LOG3(("Http2PushTransactionBuffer::WriteSegments notifying connection "
-            "consumer data available 0x%X [%u]\n",
-            mPushStream->StreamID(), Available()));
+            "consumer data available 0x%X [%u] done=%d\n",
+            mPushStream->StreamID(), Available(), mIsDone));
       mPushStream->ConnectPushedStream(consumer);
     }
   }
 
   return rv;
 }
 
 uint32_t
--- a/netwerk/protocol/http/SpdyPush31.cpp
+++ b/netwerk/protocol/http/SpdyPush31.cpp
@@ -277,23 +277,23 @@ SpdyPush31TransactionBuffer::WriteSegmen
                                        count, countWritten);
   if (NS_SUCCEEDED(rv)) {
     mBufferedHTTP1Used += *countWritten;
   }
   else if (rv == NS_BASE_STREAM_CLOSED) {
     mIsDone = true;
   }
 
-  if (Available()) {
+  if (Available() || mIsDone) {
     SpdyStream31 *consumer = mPushStream->GetConsumerStream();
 
     if (consumer) {
       LOG3(("SpdyPush31TransactionBuffer::WriteSegments notifying connection "
-            "consumer data available 0x%X [%u]\n",
-            mPushStream->StreamID(), Available()));
+            "consumer data available 0x%X [%u] done=%d\n",
+            mPushStream->StreamID(), Available(), mIsDone));
       mPushStream->ConnectPushedStream(consumer);
     }
   }
 
   return rv;
 }
 
 uint32_t