diff --git a/src/main/java/org/sonarsource/sonarlint/ls/SonarLintLanguageServer.java b/src/main/java/org/sonarsource/sonarlint/ls/SonarLintLanguageServer.java index 79912c004..fc50ea72d 100644 --- a/src/main/java/org/sonarsource/sonarlint/ls/SonarLintLanguageServer.java +++ b/src/main/java/org/sonarsource/sonarlint/ls/SonarLintLanguageServer.java @@ -271,8 +271,6 @@ private static TextDocumentSyncOptions getTextDocumentSyncOptions() { @Override public CompletableFuture shutdown() { List.of( - // start by not processing any more messages from the client - () -> Utils.shutdownAndAwait(threadPool, true), // prevent creation of new engines enginesFactory::shutdown, analysisScheduler::shutdown, @@ -301,6 +299,7 @@ private void invokeQuietly(Runnable call) { @Override public void exit() { + invokeQuietly(() -> Utils.shutdownAndAwait(threadPool, true)); // The Socket will be closed by the client, and so remaining threads will die and the JVM will terminate }