From 84d0945b57c1de698e1ef448311d82a835500c1a Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 24 Aug 2009 15:25:33 +0200 Subject: QAbstractSocket: Also check for HostLookupState connectToHostImplementation should also not be called while another lookup (= connect) is in progress. Reviewed-by: Thiago --- src/network/socket/qabstractsocket.cpp | 5 +++-- 1 file 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; } -- cgit v0.12