forked from qt-creator/qt-creator
LanguageClient: Perform safe shutdown of clients
This avoids running into a soft assert and is basically the common pattern used when shutting down the client. Change-Id: I9a2eea8d2ffe51f81d6bb78353606ef492628897 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -214,8 +214,12 @@ void LanguageClientManager::shutdown()
|
||||
if (managerInstance->m_shuttingDown)
|
||||
return;
|
||||
managerInstance->m_shuttingDown = true;
|
||||
for (auto interface : managerInstance->m_clients)
|
||||
interface->shutdown();
|
||||
for (auto interface : managerInstance->m_clients) {
|
||||
if (interface->reachable())
|
||||
interface->shutdown();
|
||||
else
|
||||
deleteClient(interface);
|
||||
}
|
||||
}
|
||||
|
||||
LanguageClientManager *LanguageClientManager::instance()
|
||||
|
Reference in New Issue
Block a user