From 5c302cc86753f95167fa9eba423fb71e16cd3c6b Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 22 Dec 2024 11:30:18 +0100 Subject: [PATCH] minor: Tell the server to stop prior to restarting it --- src/tools/rust-analyzer/editors/code/src/ctx.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/rust-analyzer/editors/code/src/ctx.ts b/src/tools/rust-analyzer/editors/code/src/ctx.ts index 4a3f66b00d00..459754b1d1cc 100644 --- a/src/tools/rust-analyzer/editors/code/src/ctx.ts +++ b/src/tools/rust-analyzer/editors/code/src/ctx.ts @@ -347,6 +347,8 @@ export class Ctx implements RustAnalyzerExtensionApi { } log.info("Disposing language client"); this.updateCommands("disable"); + // we give the server 100ms to stop gracefully + await this.client?.stop(100).catch((_) => {}); await this.disposeClient(); }