summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-19 19:43:03 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-20 08:13:56 (GMT)
commitb07d92086464921e651005772fa793e737f1ce65 (patch)
tree579feb954993eff0216f1fbb17809aad5524033b /src/network
parent075930ccd951cadcc83d30c5fc8c69e343ed70b8 (diff)
downloadQt-b07d92086464921e651005772fa793e737f1ce65.zip
Qt-b07d92086464921e651005772fa793e737f1ce65.tar.gz
Qt-b07d92086464921e651005772fa793e737f1ce65.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')
-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 95721ee..30425db 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) {