summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qabstractsocket.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-19 19:43:03 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-04-26 12:01:52 (GMT)
commit9e46d92af90ed6fb5b98a1a043f7564ec1e67a94 (patch)
treeb4af73c045e09fe846e4d138d0ff441da0ef7d60 /src/network/socket/qabstractsocket.cpp
parent51c40fdceaa7caec60f8934d9f95dbff76d5ed8e (diff)
downloadQt-9e46d92af90ed6fb5b98a1a043f7564ec1e67a94.zip
Qt-9e46d92af90ed6fb5b98a1a043f7564ec1e67a94.tar.gz
Qt-9e46d92af90ed6fb5b98a1a043f7564ec1e67a94.tar.bz2
Ensure we stop the name lookups in QAbstractSocket if we abort().
If we're not even going to connect, there's no point in trying to get the host resolution Reviewed-By: Markus Goetz
Diffstat (limited to 'src/network/socket/qabstractsocket.cpp')
-rw-r--r--src/network/socket/qabstractsocket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 21cd0fd..b604e89 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -2382,6 +2382,10 @@ void QAbstractSocket::disconnectFromHostImplementation()
#if defined(QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocket::disconnectFromHost() aborting immediately");
#endif
+ if (d->state == HostLookupState) {
+ QHostInfo::abortHostLookup(d->hostLookupId);
+ d->hostLookupId = -1;
+ }
} else {
// Perhaps emit closing()
if (d->state != ClosingState) {