minor: Tell the server to stop prior to restarting it

This commit is contained in:
Lukas Wirth 2024-12-22 11:30:18 +01:00
parent f4cafbb678
commit eb32c9f447

View file

@ -347,6 +347,8 @@ export class Ctx implements RustAnalyzerExtensionApi {
} }
log.info("Disposing language client"); log.info("Disposing language client");
this.updateCommands("disable"); this.updateCommands("disable");
// we give the server 100ms to stop gracefully
await this.client?.stop(100).catch((_) => {});
await this.disposeClient(); await this.disposeClient();
} }