Bug 1345240 - h2 stalls on failed early data hard reload

This commit is contained in:
janekptacijarabaci 2018-02-11 07:15:08 +01:00 committed by Roy Tam
commit 0f08cb0c4f

View file

@ -2320,7 +2320,13 @@ Http2Session::ReadSegmentsAgain(nsAHttpSegmentReader *reader,
if (!stream) {
LOG3(("Http2Session %p could not identify a stream to write; suspending.",
this));
uint32_t availBeforeFlush = mOutputQueueUsed - mOutputQueueSent;
FlushOutputQueue();
uint32_t availAfterFlush = mOutputQueueUsed - mOutputQueueSent;
if (availBeforeFlush != availAfterFlush) {
LOG3(("Http2Session %p ResumeRecv After early flush in ReadSegments", this));
Unused << ResumeRecv();
}
SetWriteCallbacks();
return NS_BASE_STREAM_WOULD_BLOCK;
}