summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-24 13:25:33 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-24 13:43:34 (GMT)
commit84d0945b57c1de698e1ef448311d82a835500c1a (patch)
tree1824dc849410c2d2e0604e1d849242d45c93a83b /src/network
parent9df60795dc76af807271cab9262b51f7e10307fb (diff)
downloadQt-84d0945b57c1de698e1ef448311d82a835500c1a.zip
Qt-84d0945b57c1de698e1ef448311d82a835500c1a.tar.gz
Qt-84d0945b57c1de698e1ef448311d82a835500c1a.tar.bz2
QAbstractSocket: Also check for HostLookupState
connectToHostImplementation should also not be called while another lookup (= connect) is in progress. Reviewed-by: Thiago
Diffstat (limited to 'src/network')
-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 347fb72..4fcf740 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;
}