diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-12-22 11:30:18 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2024-12-22 11:30:18 +0100 |
| commit | 5c302cc86753f95167fa9eba423fb71e16cd3c6b (patch) | |
| tree | 7c2aa75f8b51650f8091770f5d01beb94c4a3518 /src/tools/rust-analyzer/editors/code | |
| parent | b694ff3d15736641a576da3feafb83fab612420d (diff) | |
| download | rust-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.ts | 2 |
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(); } |
