summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-11-18 11:44:59 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-11-19 12:28:44 +0100
commit0b21c15b11e9af64741e26822f33dfba5975d9b0 (patch)
tree2e3209f22aa2400602c1d1da28f1b59005eb4997 /src/network/access/qhttpnetworkconnectionchannel.cpp
parent2fab1971fed22a9aa852e8df8155b6d5da83279d (diff)
HTTP2: fix crash from assertion
In general the protocolHandler isn't deleted unless the channel is being destructed. So instead of reset()ing the pointer we keep it around. Also update the http2protocolhandler to mimic the http1 handler a little closer: shutting down the channel in receiveReply if there's no reply/activeStreams, and not calling receiveReply at all if there's no activeStreams. Pick-to: 5.15 Change-Id: I702547f594deb6b0c1384068f7e93e560527e8e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index edbaa7efce..8547037132 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -995,7 +995,6 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
&& switchedToHttp2)) {
auto h2Handler = static_cast<QHttp2ProtocolHandler *>(protocolHandler.data());
h2Handler->handleConnectionClosure();
- protocolHandler.reset();
}
}
return;