Skip to content

Commit

Permalink
Merge pull request #27 from Christopher-R-Perkins/fix/lsclient-enviro…
Browse files Browse the repository at this point in the history
…nment-reload

Fix: lsclient environment reload
  • Loading branch information
strickvl authored Jul 17, 2024
2 parents e1d0741 + 8cf077c commit 51084af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build/
*.tsbuildinfo
.history/
dag-packed.js
dag-packed.js.map

# env
.env
Expand Down
6 changes: 5 additions & 1 deletion src/common/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
}
Expand Down

0 comments on commit 51084af

Please sign in to comment.