summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-11-30 16:38:07 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-12-03 12:40:50 +0100
commit9ef14f84219c0ea77ebc6eb63aeb17483c4c726c (patch)
tree37ab8a0a0c0f8ed2c5738345944314197ea86237
parentfeae98eb670fd427885c38a385e95d4ebf476241 (diff)
Http2: Remove errored-out requests from queue
The requests will remove themselves once they get deleted but since the deletion is done through a _queued_ invokeMethod to 'deleteLater' we will call QHttpNetworkConnection::_q_startNextRequest first which may end up starting a reconnect of the TCP socket which we had the error on. In this specific instance it manifested as a race condition where we either don't get a proxyAuthorizationRequired signal at all (it was emitted while we didn't have any valid replies), or we get the signal emitted too late and it gets emitted on whatever the next reply was. Task-number: QTBUG-88417 Change-Id: If3f8ececc5550f1868c90124559cb8e3029646d8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 65bcac95a7a051d4343aaa3c5ff8b39494aa14e4)
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp1
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST3
2 files changed, 1 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index ba3cb8f071..fe50d1500a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1136,6 +1136,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
Q_ASSERT(currentReply);
emit currentReply->finishedWithError(errorCode, errorString);
}
+ spdyRequestsToSend.clear();
}
// send the next request
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST
index 801ac65d71..2bc1c85cba 100644
--- a/tests/auto/network/access/qnetworkreply/BLACKLIST
+++ b/tests/auto/network/access/qnetworkreply/BLACKLIST
@@ -1,7 +1,4 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-[authenticationCacheAfterCancel]
-windows-7sp1
-windows-10 msvc-2015
[backgroundRequestInterruption]
opensuse-leap
windows-10 msvc-2015