Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #18737 from Veykril/push-rslstwynmzpx
minor: Tell the server to stop prior to restarting it
Lukas Wirth 2024-12-22
parent 31938db · parent eb32c9f · commit ca17481
-rw-r--r--editors/code/src/ctx.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 4a3f66b00d..459754b1d1 100644
--- a/editors/code/src/ctx.ts
+++ b/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();
}