forked from qt-creator/qt-creator
Clang: Disconnect from server if process is a zombie
Task-number: QTCREATORBUG-19370 Change-Id: Ibf96c38004e0e0e9aa436df946076979f07df0da Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -69,6 +69,12 @@ void ConnectionClient::startProcessAndConnectToServerAsynchronously()
|
||||
m_processFuture = m_processCreator.createProcess();
|
||||
}
|
||||
|
||||
void ConnectionClient::disconnectFromServer()
|
||||
{
|
||||
if (m_localSocket)
|
||||
m_localSocket->disconnectFromServer();
|
||||
}
|
||||
|
||||
bool ConnectionClient::isConnected() const
|
||||
{
|
||||
return m_localSocket && m_localSocket->state() == QLocalSocket::ConnectedState;
|
||||
@@ -164,6 +170,7 @@ void ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty()
|
||||
if (!m_localSocket || m_localSocket->bytesAvailable() > 0)
|
||||
return; // We come first, the incoming data was not yet processed.
|
||||
|
||||
disconnectFromServer();
|
||||
restartProcessAsynchronously();
|
||||
}
|
||||
|
||||
|
@@ -58,6 +58,7 @@ public:
|
||||
virtual ~ConnectionClient();
|
||||
|
||||
void startProcessAndConnectToServerAsynchronously();
|
||||
void disconnectFromServer();
|
||||
bool isConnected() const;
|
||||
|
||||
void sendEndMessage();
|
||||
|
Reference in New Issue
Block a user