summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-12-07 18:23:34 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-12-09 16:51:01 +0100
commitbf22d9092a1edf8e3879b40f5018baeedd8bb596 (patch)
tree658298c52803b0239dbd0a7eae3f602f9111e3d3 /src/network
parent020a6f0daec2e36866888b23c8b3a65bfb366146 (diff)
Http2: set the reply's error code and string on error
If the error occurs during the call to QHttpNetworkConnectionPrivate::queueRequest coming from the http thread delegate then we will not yet have connected to the signal! But the http thread delegate checks if the error code is not NoError, and handles those situations. To let that work we must update the replies. Change-Id: I47188e9439920694aaad1765ab28add1e86ccdff Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit b4d7908d5a623bd0024d290eee6e2226a627542d)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index fe50d1500a..f1db274402 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1133,6 +1133,8 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
for (int a = 0; a < spdyPairs.count(); ++a) {
// emit error for all replies
QHttpNetworkReply *currentReply = spdyPairs.at(a).second;
+ currentReply->d_func()->errorString = errorString;
+ currentReply->d_func()->httpErrorCode = errorCode;
Q_ASSERT(currentReply);
emit currentReply->finishedWithError(errorCode, errorString);
}