MCPcopy Create free account
hub / github.com/codeaashu/claude-code / shutdownLspServerManager

Function shutdownLspServerManager

src/services/lsp/manager.ts:267–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265 * @returns Promise that resolves when shutdown completes (errors are swallowed)
266 */
267export async function shutdownLspServerManager(): Promise<void> {
268 if (lspManagerInstance === undefined) {
269 return
270 }
271
272 try {
273 await lspManagerInstance.shutdown()
274 logForDebugging('LSP server manager shut down successfully')
275 } catch (error: unknown) {
276 logError(error as Error)
277 logForDebugging(
278 `Failed to shutdown LSP server manager: ${errorMessage(error)}`,
279 )
280 } finally {
281 // Always clear state even if shutdown failed
282 lspManagerInstance = undefined
283 initializationState = 'not-started'
284 initializationError = undefined
285 initializationPromise = undefined
286 // Increment generation to invalidate any pending initializations
287 initializationGeneration++
288 }
289}
290

Callers

nothing calls this directly

Calls 4

logForDebuggingFunction · 0.85
logErrorFunction · 0.50
errorMessageFunction · 0.50
shutdownMethod · 0.45

Tested by

no test coverage detected