Bug 1174899 - discarded spdy data with fin attributed to wrong stream. r=bagder, a=lizzard
authorPatrick McManus <mcmanus@ducksong.com>
Sun, 22 Nov 2015 16:23:18 -0500
changeset 291670 2e3d88bfd9c2
parent 291669 8ff5b3342e75
child 291671 4220147dda30
push id8768
push usercbook@mozilla.com
push date2015-11-26 11:17 +0000
treeherdermozilla-aurora@cf1ecaa105a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbagder, lizzard
bugs1174899
milestone44.0a2
Bug 1174899 - discarded spdy data with fin attributed to wrong stream. r=bagder, a=lizzard
netwerk/protocol/http/Http2Session.cpp
netwerk/protocol/http/SpdySession31.cpp
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -594,16 +594,17 @@ Http2Session::ResetDownstreamState()
   ChangeDownstreamState(BUFFERING_FRAME_HEADER);
 
   if (mInputFrameFinal && mInputFrameDataStream) {
     mInputFrameFinal = false;
     LOG3(("  SetRecvdFin id=0x%x\n", mInputFrameDataStream->StreamID()));
     mInputFrameDataStream->SetRecvdFin(true);
     MaybeDecrementConcurrent(mInputFrameDataStream);
   }
+  mInputFrameFinal = false;
   mInputFrameBufferUsed = 0;
   mInputFrameDataStream = nullptr;
 }
 
 // return true if activated (and counted against max)
 // otherwise return false and queue
 bool
 Http2Session::TryToActivate(Http2Stream *aStream)
--- a/netwerk/protocol/http/SpdySession31.cpp
+++ b/netwerk/protocol/http/SpdySession31.cpp
@@ -549,16 +549,17 @@ SpdySession31::ResetDownstreamState()
   if (mInputFrameDataLast && mInputFrameDataStream) {
     mInputFrameDataLast = false;
     if (!mInputFrameDataStream->RecvdFin()) {
       LOG3(("  SetRecvdFin id=0x%x\n", mInputFrameDataStream->StreamID()));
       mInputFrameDataStream->SetRecvdFin(true);
       DecrementConcurrent(mInputFrameDataStream);
     }
   }
+  mInputFrameDataLast = false;
   mInputFrameBufferUsed = 0;
   mInputFrameDataStream = nullptr;
 }
 
 // return true if activated (and counted against max)
 // otherwise return false and queue
 bool
 SpdySession31::TryToActivate(SpdyStream31 *aStream)