summaryrefslogtreecommitdiff
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-09-20 10:24:58 +0200
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-09-20 10:51:19 +0200
commitb07a1ecb9734929b29838b2af7be619aab3bf2d5 (patch)
tree9ff5febc6d4c6e8a86860cd3e157b2c59ac8dc2d /src/network/access/qhttpnetworkconnection.cpp
parentf412a9cb0bd1438d1518cf6a8eda3fda5fbf64f5 (diff)
downloadqt4-tools-b07a1ecb9734929b29838b2af7be619aab3bf2d5.tar.gz
Fix one hang of QNAM on Symbian.
This one happened especially more often on amazon.de. While one channel was taken by one request, but postponed because it was still in disconnecting mode, another request would come, pick the same channel, and overwrite the request/reply assignment of this channel. The first request would be left unhandled eternally. Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index ae4d25742c..ccdbb20f79 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -743,7 +743,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
return;
// try to get a free AND connected socket
for (int i = 0; i < channelCount; ++i) {
- if (!channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) {
+ if (!channels[i].reply && !channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) {
dequeueAndSendRequest(channels[i].socket);
}
}
@@ -753,7 +753,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
return;
// try to get a free unconnected socket
for (int i = 0; i < channelCount; ++i) {
- if (!channels[i].isSocketBusy()) {
+ if (!channels[i].reply && !channels[i].isSocketBusy()) {
dequeueAndSendRequest(channels[i].socket);
}
}