bug 1072478 - h2 push loses fin bit race condition 1/2 r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Tue, 13 Jan 2015 15:26:23 -0500
changeset 224232 5ec4e66b6b6ff78020bde8fa10ddf0dbaf3b71f0
parent 224231 8ef8e6f97a584abbd51795af6692beedddcf3f0c
child 224233 4aefc5bf7ec4d876ea5b0bc06c8ffbd79d8d081e
push id54163
push usermcmanus@ducksong.com
push dateFri, 16 Jan 2015 17:40:40 +0000
treeherdermozilla-inbound@4aefc5bf7ec4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1072478
milestone38.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