summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-06-18 15:33:14 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-06-18 15:33:14 +0200
commit8675a8915d09d0ca2091c606345a2d99f642949b (patch)
tree4768c058bc33f624015030f990444b493ae553fb /src/network
parent747c7a9a060267dee9622c96bf0e2a54147dacfa (diff)
QNAM HTTP code: Do not close TCP connection in all cases
This makes sure the keep-alive connections stay open even if someone deletes a QNetworkReply which will then go all the way down to removeReply(QHttpNetworkReply). Should fix http://lists.trolltech.com/pipermail/qt-interest/2009-June/007777.html Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index f698c712f9..4c08794e15 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -937,7 +937,8 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
for (int i = 0; i < channelCount; ++i) {
if (channels[i].reply == reply) {
channels[i].reply = 0;
- closeChannel(i);
+ if (reply->d_func()->connectionCloseEnabled())
+ closeChannel(i);
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
return;
}