forked from qt-creator/qt-creator
LanguageClient: send exit notification after failed shutdown
Despite receiving an error in the shutdown response continue to exit the server. Otherwise we end up with an unusable client. Change-Id: Iacff38699cb4e5bcc5610eba1654047bf7f8ce80 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1560,12 +1560,8 @@ void Client::shutDownCallback(const ShutdownRequest::Response &shutdownResponse)
|
||||
m_shutdownTimer.stop();
|
||||
QTC_ASSERT(m_state == ShutdownRequested, return);
|
||||
QTC_ASSERT(m_clientInterface, return);
|
||||
optional<ShutdownRequest::Response::Error> errorValue = shutdownResponse.error();
|
||||
if (errorValue.has_value()) {
|
||||
ShutdownRequest::Response::Error error = errorValue.value();
|
||||
qDebug() << error;
|
||||
return;
|
||||
}
|
||||
if (optional<ShutdownRequest::Response::Error> error = shutdownResponse.error())
|
||||
log(*error);
|
||||
// directly send message otherwise the state check of sendContent would fail
|
||||
sendMessage(ExitNotification().toBaseMessage());
|
||||
qCDebug(LOGLSPCLIENT) << "language server " << m_displayName << " shutdown";
|
||||
|
||||
Reference in New Issue
Block a user