diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-25 06:00:55 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-25 06:00:55 (GMT) |
commit | 32b5fdfabf3158c7b03d1011f4551a45371b27e3 (patch) | |
tree | 0339732e5529917a52eb7ff86e6209c262ab7032 /src/network | |
parent | d373f8b8ee0a5841bcdb264b0b01b262c15e7f89 (diff) | |
parent | a4f0b174dd7d6eb837915d9d99b2067b8cb00187 (diff) | |
download | Qt-32b5fdfabf3158c7b03d1011f4551a45371b27e3.zip Qt-32b5fdfabf3158c7b03d1011f4551a45371b27e3.tar.gz Qt-32b5fdfabf3158c7b03d1011f4551a45371b27e3.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts:
mkspecs/common/symbian/symbian.conf
qmake/generators/symbian/symmake.cpp
src/3rdparty/webkit/WebCore/WebCore.pro
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 9 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 1 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 1d8224c..82bc14f 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -865,7 +865,14 @@ void QHttpNetworkConnectionChannel::_q_disconnected() void QHttpNetworkConnectionChannel::_q_connected() { // improve performance since we get the request sent by the kernel ASAP - socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); + //socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); + // We have this commented out now. It did not have the effect we wanted. If we want to + // do this properly, Qt has to combine multiple HTTP requests into one buffer + // and send this to the kernel in one syscall and then the kernel immediately sends + // it as one TCP packet because of TCP_NODELAY. + // However, this code is currently not in Qt, so we rely on the kernel combining + // the requests into one TCP packet. + // not sure yet if it helps, but it makes sense socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1); diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 3d0c32d..baf69e7 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -479,6 +479,7 @@ void QHostInfoRunnable::run() QHostInfoLookupManager::QHostInfoLookupManager() : mutex(QMutex::Recursive), wasDeleted(false) { moveToThread(QCoreApplicationPrivate::mainThread()); + connect(QCoreApplication::instance(), SIGNAL(destroyed()), SLOT(waitForThreadPoolDone()), Qt::DirectConnection); threadPool.setMaxThreadCount(5); // do 5 DNS lookups in parallel } diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 2b26b07..4fc74e9 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -184,6 +184,9 @@ protected: QMutex mutex; bool wasDeleted; + +private slots: + void waitForThreadPoolDone() { threadPool.waitForDone(); } }; #endif |