LanguageClient: fix leak on restarting crashed client

Change-Id: I3107d0afc81e1511c5ca643919d074226f221170
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-05-20 07:17:38 +02:00
parent 7450bcb2b9
commit 8174dabe57

View File

@@ -110,6 +110,10 @@ StdIOClientInterface::~StdIOClientInterface()
void StdIOClientInterface::startImpl()
{
if (m_process) {
QTC_ASSERT(!m_process->isRunning(), m_process->stopProcess() );
delete m_process;
}
m_process = new Utils::QtcProcess;
m_process->setProcessMode(ProcessMode::Writer);
connect(m_process, &QtcProcess::readyReadStandardError,