forked from qt-creator/qt-creator
LanguageClient: Fix crashed client restart condition
Change-Id: I4b0195a512b6b1dcbcc6fd02f6014a27b4606ea0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -172,7 +172,8 @@ void LanguageClientManager::clientFinished(Client *client)
|
||||
= managerInstance->m_clientForDocument.keys(client);
|
||||
if (unexpectedFinish) {
|
||||
if (!PluginManager::isShuttingDown()) {
|
||||
if (client->state() == Client::Initialized && client->reset()) {
|
||||
const bool shouldRestart = client->state() > Client::FailedToInitialize;
|
||||
if (shouldRestart && client->reset()) {
|
||||
qCDebug(Log) << "restart unexpectedly finished client: " << client->name() << client;
|
||||
client->log(
|
||||
Tr::tr("Unexpectedly finished. Restarting in %1 seconds.").arg(restartTimeoutS));
|
||||
|
||||
Reference in New Issue
Block a user