From b923bd053604ea644fab2e27649328447409f26f Mon Sep 17 00:00:00 2001 From: Richard Li Date: Wed, 12 Feb 2025 16:43:30 -0800 Subject: [PATCH] fix(amazonq): also terminate lsp process on other failures --- .../jetbrains/services/amazonq/lsp/AmazonQLspService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt index 44a6896e0bb..4bd37bc058a 100644 --- a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt +++ b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt @@ -214,11 +214,13 @@ private class AmazonQServerInstance(private val project: Project, private val cs } catch (_: TimeoutCancellationException) { LOG.warn { "LSP initialization timed out" } null + } catch (e: Exception) { + LOG.warn(e) { "LSP initialization failed" } + null } // then if this succeeds then we can allow the client to send requests if (initializeResult == null) { - LOG.warn { "LSP initialization failed" } launcherHandler.destroyProcess() } languageServer.initialized(InitializedParams())