summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-19 21:43:03 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-20 10:13:56 +0200
commitb07d92086464921e651005772fa793e737f1ce65 (patch)
tree579feb954993eff0216f1fbb17809aad5524033b /src/network
parent075930ccd951cadcc83d30c5fc8c69e343ed70b8 (diff)
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')
-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 95721eee66..30425db26e 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) {