diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-09-20 08:24:58 (GMT) |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-09-20 08:51:19 (GMT) |
commit | b07a1ecb9734929b29838b2af7be619aab3bf2d5 (patch) | |
tree | 9ff5febc6d4c6e8a86860cd3e157b2c59ac8dc2d | |
parent | f412a9cb0bd1438d1518cf6a8eda3fda5fbf64f5 (diff) | |
download | Qt-b07a1ecb9734929b29838b2af7be619aab3bf2d5.zip Qt-b07a1ecb9734929b29838b2af7be619aab3bf2d5.tar.gz Qt-b07a1ecb9734929b29838b2af7be619aab3bf2d5.tar.bz2 |
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
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index ae4d257..ccdbb20 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); } } |