From f0b7a73f333244f143fa35708217ba469fbee094 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 15 Apr 2016 12:14:00 +0200 Subject: [PATCH] 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 --- src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index fba83df7b8d..9f9fcc80015 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -112,13 +112,18 @@ void QmlProfilerClientManager::setTcpConnection(QString host, quint64 port) { d->tcpHost = host; d->tcpPort = port; + d->localSocket.clear(); disconnectClient(); + // Wait for the application to announce the port before connecting. } void QmlProfilerClientManager::setLocalSocket(QString file) { d->localSocket = file; + d->tcpHost.clear(); d->tcpPort = 0; + disconnectClient(); + // We open the server and the application connects to it, so let's do that right away. connectLocalClient(file); }