From b4d7908d5a623bd0024d290eee6e2226a627542d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 7 Dec 2020 18:23:34 +0100 Subject: 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 --- src/network/access/qhttpnetworkconnectionchannel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network') 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); } -- cgit v1.2.3