about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2024-12-22 10:44:27 +0000
committerGitHub <noreply@github.com>2024-12-22 10:44:27 +0000
commit36455e9557f4c5c7af97916ab15d6bf9b090ace8 (patch)
tree3f548d3f1cbe62bde5323a8aaab9c99d0f372be4
parent9812c4de0778de9697d0a6759fc042f719f79e0c (diff)
parent5c302cc86753f95167fa9eba423fb71e16cd3c6b (diff)
downloadrust-36455e9557f4c5c7af97916ab15d6bf9b090ace8.tar.gz
rust-36455e9557f4c5c7af97916ab15d6bf9b090ace8.zip
Merge pull request #18737 from Veykril/push-rslstwynmzpx
minor: Tell the server to stop prior to restarting it
-rw-r--r--src/tools/rust-analyzer/editors/code/src/ctx.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/editors/code/src/ctx.ts b/src/tools/rust-analyzer/editors/code/src/ctx.ts
index 4a3f66b00d0..459754b1d1c 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();
     }