From cd5eb376afbd733072486ba4b8012bbe97c46af1 Mon Sep 17 00:00:00 2001 From: Christopher Perkins Date: Wed, 17 Jul 2024 12:25:12 -0400 Subject: [PATCH 1/2] fix: added dag-packed.js.map to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6e24fde5..51484850 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ build/ *.tsbuildinfo .history/ dag-packed.js +dag-packed.js.map # env .env From 8cf077cde17acff8e4f567a1a3490fd55281b39e Mon Sep 17 00:00:00 2001 From: Christopher Perkins Date: Wed, 17 Jul 2024 12:26:16 -0400 Subject: [PATCH 2/2] fix: handled error when trying to stop a LS that is not running while trying to restart it --- src/common/server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/server.ts b/src/common/server.ts index e0e0dfe8..b2862f8f 100644 --- a/src/common/server.ts +++ b/src/common/server.ts @@ -111,7 +111,11 @@ export async function restartServer( const lsClient = lsClientInstance.getLanguageClient(); if (lsClient) { traceInfo(`Server: Stop requested`); - await lsClient.stop(); + try { + await lsClient.stop(); + } catch (e) { + traceInfo(`Server: Stop failed - ${e}`, '\nContinuing to attempt to start'); + } _disposables.forEach(d => d.dispose()); _disposables = []; }