diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2020-12-07 18:23:34 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-17 22:53:01 +0000 |
commit | 6e4892a6c37756573b2fb0d5f9270b63bab2b7ee (patch) | |
tree | 4ed5feedc80f6730890bf4836dd0951e3d5613a7 /src/network | |
parent | b97001aa1cbd21008ebc48fe61b15fbcacb14875 (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)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 2 |
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); } |