QHttp2Connection: properly count only the active streams
For a function whose only purpose is to count active streams it was missing a quite important aspect. Change-Id: I9110949c0f00acc9fb3bc115f7a66e0c0f4502d0 Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 3fe9c38053774ea3dd6b20d14dd664dd8464208c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c6d6e05aae
commit
cb8a8afe42
@ -823,7 +823,7 @@ QHttp2Stream *QHttp2Connection::createStreamInternal_impl(quint32 streamID)
|
||||
qsizetype QHttp2Connection::numActiveStreamsImpl(quint32 mask) const noexcept
|
||||
{
|
||||
const auto shouldCount = [mask](const QPointer<QHttp2Stream> &stream) -> bool {
|
||||
return stream && (stream->streamID() & 1) == mask;
|
||||
return stream && (stream->streamID() & 1) == mask && stream->isActive();
|
||||
};
|
||||
return std::count_if(m_streams.cbegin(), m_streams.cend(), shouldCount);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user