Bug 1354233 - Add stream to m0RTTStreams after streamId is set. r=mcmanus

This commit is contained in:
Dragana Damjanovic 2017-04-07 17:28:21 +02:00
Родитель c831108a0e
Коммит 2b3a916d76
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -2514,10 +2514,6 @@ Http2Session::ReadSegmentsAgain(nsAHttpSegmentReader *reader,
return *countRead ? NS_OK : NS_BASE_STREAM_WOULD_BLOCK;
}
if (!m0RTTStreams.Contains(stream->StreamID())) {
m0RTTStreams.AppendElement(stream->StreamID());
}
// Need to adjust this to only take as much as we can fit in with the
// preamble/settings/priority stuff
count -= (mOutputQueueUsed - mOutputQueueSent);
@ -2540,6 +2536,12 @@ Http2Session::ReadSegmentsAgain(nsAHttpSegmentReader *reader,
*countRead += earlyDataUsed;
}
if (mAttemptingEarlyData && !m0RTTStreams.Contains(stream->StreamID())) {
LOG3(("Http2Session::ReadSegmentsAgain adding stream %d to m0RTTStreams\n",
stream->StreamID()));
m0RTTStreams.AppendElement(stream->StreamID());
}
// Not every permutation of stream->ReadSegents produces data (and therefore
// tries to flush the output queue) - SENDING_FIN_STREAM can be an example
// of that. But we might still have old data buffered that would be good