forked from qt-creator/qt-creator
QmlProfiler: Properly clear any pending connections before reconnecting
Otherwise we might end up waiting forever for a previous session's connection. Change-Id: I695d7a1ce21bc9720cc84436a7c4e6ba4616b0ab Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -112,13 +112,18 @@ void QmlProfilerClientManager::setTcpConnection(QString host, quint64 port)
|
|||||||
{
|
{
|
||||||
d->tcpHost = host;
|
d->tcpHost = host;
|
||||||
d->tcpPort = port;
|
d->tcpPort = port;
|
||||||
|
d->localSocket.clear();
|
||||||
disconnectClient();
|
disconnectClient();
|
||||||
|
// Wait for the application to announce the port before connecting.
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerClientManager::setLocalSocket(QString file)
|
void QmlProfilerClientManager::setLocalSocket(QString file)
|
||||||
{
|
{
|
||||||
d->localSocket = file;
|
d->localSocket = file;
|
||||||
|
d->tcpHost.clear();
|
||||||
d->tcpPort = 0;
|
d->tcpPort = 0;
|
||||||
|
disconnectClient();
|
||||||
|
// We open the server and the application connects to it, so let's do that right away.
|
||||||
connectLocalClient(file);
|
connectLocalClient(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user