forked from qt-creator/qt-creator
QmlDebugClient: Check for gotHello to determine if connection is open
The isConnected() method was misleading as it only checked for the network socket to be connected. Sending data before the hello message arrives is a pretty stupid idea and the debug clients need a way to detect that. The new isOpen method stresses that it's about the logical protocol, not the network socket. Change-Id: I84f093d91d7a21d20a8f3d14730c9f189ec35bde Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -243,7 +243,7 @@ void QmlProfilerClientManager::connectToClient()
|
||||
|
||||
bool QmlProfilerClientManager::isConnected() const
|
||||
{
|
||||
return d->connection && d->connection->isConnected();
|
||||
return d->connection && d->connection->isOpen();
|
||||
}
|
||||
|
||||
void QmlProfilerClientManager::disconnectClient()
|
||||
@@ -260,7 +260,7 @@ void QmlProfilerClientManager::tryToConnect()
|
||||
{
|
||||
++d->connectionAttempts;
|
||||
|
||||
if (d->connection && d->connection->isConnected()) {
|
||||
if (d->connection && d->connection->isOpen()) {
|
||||
d->connectionTimer.stop();
|
||||
d->connectionAttempts = 0;
|
||||
} else if (d->connectionAttempts == 50) {
|
||||
|
||||
Reference in New Issue
Block a user