summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-24 15:25:33 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-24 15:43:34 +0200
commit84d0945b57c1de698e1ef448311d82a835500c1a (patch)
tree1824dc849410c2d2e0604e1d849242d45c93a83b
parent9df60795dc76af807271cab9262b51f7e10307fb (diff)
downloadqt4-tools-84d0945b57c1de698e1ef448311d82a835500c1a.tar.gz
QAbstractSocket: Also check for HostLookupState
connectToHostImplementation should also not be called while another lookup (= connect) is in progress. Reviewed-by: Thiago
-rw-r--r--src/network/socket/qabstractsocket.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 347fb72825..4fcf7400aa 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1282,8 +1282,9 @@ void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint
(int) openMode);
#endif
- if (d->state == ConnectedState || d->state == ConnectingState || d->state == ClosingState) {
- qWarning("QAbstractSocket::connectToHost() called when already connecting/connected to \"%s\"", qPrintable(hostName));
+ if (d->state == ConnectedState || d->state == ConnectingState
+ || d->state == ClosingState || d->state == HostLookupState) {
+ qWarning("QAbstractSocket::connectToHost() called when already looking up or connecting/connected to \"%s\"", qPrintable(hostName));
return;
}