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-07 22:34:49 +0000
commitb4d7908d5a623bd0024d290eee6e2226a627542d (patch)
treeb38dc9a75bafcd4a916ebd3a1097f90fd13b6bf0 /src/network
parent0e742c9addd4d5202df20f03c3cc2ef984150f52 (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. Pick-to: 6.0 5.15 Change-Id: I47188e9439920694aaad1765ab28add1e86ccdff Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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 977dd77643..1ba833aef4 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1119,6 +1119,8 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
for (int a = 0; a < h2Pairs.count(); ++a) {
// emit error for all replies
QHttpNetworkReply *currentReply = h2Pairs.at(a).second;
+ currentReply->d_func()->errorString = errorString;
+ currentReply->d_func()->httpErrorCode = errorCode;
Q_ASSERT(currentReply);
emit currentReply->finishedWithError(errorCode, errorString);
}