Skip to content

Commit

Permalink
Unset the error handler before stopping the language server.
Browse files Browse the repository at this point in the history
This makes sure the 'unrecoverable error -- exited with code 0'
doesn't print when trying to restart LSP etc.

Signed-off-by: Danila Fedorin <[email protected]>
  • Loading branch information
DanilaFe committed Mar 8, 2024
1 parent 2380d70 commit 77908bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ChapelLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ export abstract class ChapelLanguageClient {
stop(): Promise<void> {
return new Promise((resolve, reject) => {
if (this.client && this.state === LanguageClientState.RUNNING) {
this.client.errorHandler = () => {};
this.client.stop().catch(reject);
this.client.dispose();
this.client = undefined;
Expand Down

0 comments on commit 77908bc

Please sign in to comment.