Skip to content

Commit 5c302cc

Browse files
committed
minor: Tell the server to stop prior to restarting it
1 parent b694ff3 commit 5c302cc

File tree

1 file changed

+2
-0
lines changed
  • src/tools/rust-analyzer/editors/code/src

1 file changed

+2
-0
lines changed

src/tools/rust-analyzer/editors/code/src/ctx.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ export class Ctx implements RustAnalyzerExtensionApi {
347347
}
348348
log.info("Disposing language client");
349349
this.updateCommands("disable");
350+
// we give the server 100ms to stop gracefully
351+
await this.client?.stop(100).catch((_) => {});
350352
await this.disposeClient();
351353
}
352354

0 commit comments

Comments
 (0)