forked from qt-creator/qt-creator
LanguageClient: Fix handling of defective language server
If the language server cannot be started, the client might be already in an error state before the language server gets initialized. Change-Id: Ib6c9df13b381e7854806714c07f4830796bb2cd3 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -113,6 +113,8 @@ void LanguageClientManager::clientStarted(Client *client)
|
|||||||
qCDebug(Log) << "client started: " << client->name() << client;
|
qCDebug(Log) << "client started: " << client->name() << client;
|
||||||
QTC_ASSERT(managerInstance, return);
|
QTC_ASSERT(managerInstance, return);
|
||||||
QTC_ASSERT(client, return);
|
QTC_ASSERT(client, return);
|
||||||
|
if (client->state() != Client::Uninitialized) // do not proceed if we already received an error
|
||||||
|
return;
|
||||||
if (g_shuttingDown) {
|
if (g_shuttingDown) {
|
||||||
clientFinished(client);
|
clientFinished(client);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user