From e2c3dd796f545d38111f3c0a984abe31068cd501 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Tue, 13 Jan 2015 15:26:23 -0500 Subject: [PATCH] bug 1072478 - h2 push loses fin bit race condition 1/2 r=hurley --HG-- extra : rebase_source : 25ba5077d89f4cbf4c1a8e93a3c4da1536260d83 --- netwerk/protocol/http/Http2Push.cpp | 6 +++--- netwerk/protocol/http/SpdyPush31.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/netwerk/protocol/http/Http2Push.cpp b/netwerk/protocol/http/Http2Push.cpp index 864e89d165bc..7c05e39fef27 100644 --- a/netwerk/protocol/http/Http2Push.cpp +++ b/netwerk/protocol/http/Http2Push.cpp @@ -353,13 +353,13 @@ Http2PushTransactionBuffer::WriteSegments(nsAHttpSegmentWriter *writer, 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); } } diff --git a/netwerk/protocol/http/SpdyPush31.cpp b/netwerk/protocol/http/SpdyPush31.cpp index 3084e7837f22..6c6869c31197 100644 --- a/netwerk/protocol/http/SpdyPush31.cpp +++ b/netwerk/protocol/http/SpdyPush31.cpp @@ -282,13 +282,13 @@ SpdyPush31TransactionBuffer::WriteSegments(nsAHttpSegmentWriter *writer, 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); } }