Skip to content

Commit 3a866a6

Browse files
authored
fix(amazonq): also terminate lsp process on other failures (#5371)
1 parent d9f7bb3 commit 3a866a6

File tree

1 file changed

+3
-1
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp

1 file changed

+3
-1
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@ private class AmazonQServerInstance(private val project: Project, private val cs
214214
} catch (_: TimeoutCancellationException) {
215215
LOG.warn { "LSP initialization timed out" }
216216
null
217+
} catch (e: Exception) {
218+
LOG.warn(e) { "LSP initialization failed" }
219+
null
217220
}
218221

219222
// then if this succeeds then we can allow the client to send requests
220223
if (initializeResult == null) {
221-
LOG.warn { "LSP initialization failed" }
222224
launcherHandler.destroyProcess()
223225
}
224226
languageServer.initialized(InitializedParams())

0 commit comments

Comments
 (0)