about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2024-12-22 11:30:18 +0100
committerLukas Wirth <lukastw97@gmail.com>2024-12-22 11:30:18 +0100
commit5c302cc86753f95167fa9eba423fb71e16cd3c6b (patch)
tree7c2aa75f8b51650f8091770f5d01beb94c4a3518 /src/tools/rust-analyzer/editors/code
parentb694ff3d15736641a576da3feafb83fab612420d (diff)
downloadrust-5c302cc86753f95167fa9eba423fb71e16cd3c6b.tar.gz
rust-5c302cc86753f95167fa9eba423fb71e16cd3c6b.zip
minor: Tell the server to stop prior to restarting it
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-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();
     }