From c4be180558108e501b1214d548922e8736144d09 Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Thu, 10 Mar 2022 15:43:20 +0800 Subject: [PATCH] fix tsserver.restart not work --- src/server/index.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/server/index.ts b/src/server/index.ts index 6744848..d1866f6 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -118,14 +118,10 @@ export default class TsserverService implements IServiceProvider { }) } - public restart(): void { + public async restart(): Promise { if (!this.enable) return - if (this.clientHost) { - let client = this.clientHost.serviceClient - client.restartTsServer() - } else { - void this.start() - } + await this.stop() + await this.start() } public async stop(): Promise {