Summary
The LSP implementation records shutdown but never uses it to stop the read loop. exit returns null and also leaves Run blocked on further input, so clients cannot terminate the server through normal LSP lifecycle messages.
Evidence
src/CodeIndex/Lsp/LspServer.cs:55 handles exit as null only.
src/CodeIndex/Lsp/LspServer.cs:71 sets _shutdownRequested = true for shutdown.
src/CodeIndex/Lsp/LspServer.cs:29 loops only on TryReadMessage and does not observe _shutdownRequested.
src/CodeIndex/Lsp/LspServer.cs:393 only reads _shutdownRequested in Dispose.
Expected
After shutdown and exit, the LSP server should leave the message loop and return cleanly.
Summary
The LSP implementation records
shutdownbut never uses it to stop the read loop.exitreturnsnulland also leavesRunblocked on further input, so clients cannot terminate the server through normal LSP lifecycle messages.Evidence
src/CodeIndex/Lsp/LspServer.cs:55handlesexitasnullonly.src/CodeIndex/Lsp/LspServer.cs:71sets_shutdownRequested = trueforshutdown.src/CodeIndex/Lsp/LspServer.cs:29loops only onTryReadMessageand does not observe_shutdownRequested.src/CodeIndex/Lsp/LspServer.cs:393only reads_shutdownRequestedinDispose.Expected
After
shutdownandexit, the LSP server should leave the message loop and return cleanly.