summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttp2protocolhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qhttp2protocolhandler.cpp')
-rw-r--r--src/network/access/qhttp2protocolhandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
index de6b5ac18f..8f77911341 100644
--- a/src/network/access/qhttp2protocolhandler.cpp
+++ b/src/network/access/qhttp2protocolhandler.cpp
@@ -264,7 +264,8 @@ void QHttp2ProtocolHandler::_q_uploadDataDestroyed(QObject *uploadData)
void QHttp2ProtocolHandler::_q_readyRead()
{
- _q_receiveReply();
+ if (!goingAway || activeStreams.size())
+ _q_receiveReply();
}
void QHttp2ProtocolHandler::_q_receiveReply()
@@ -272,6 +273,11 @@ void QHttp2ProtocolHandler::_q_receiveReply()
Q_ASSERT(m_socket);
Q_ASSERT(m_channel);
+ if (goingAway && activeStreams.isEmpty()) {
+ m_channel->close();
+ return;
+ }
+
while (!goingAway || activeStreams.size()) {
const auto result = frameReader.read(*m_socket);
switch (result) {