Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle shutdown lifecycle properly #536

Merged
merged 4 commits into from
Jul 25, 2022
Merged

fix: handle shutdown lifecycle properly #536

merged 4 commits into from
Jul 25, 2022

Conversation

rchl
Copy link
Member

@rchl rchl commented Jul 24, 2022

Remove forced process exit from mocha configuration (which was a way to workaround the issue with the server process not being explicitly shut down) and make sure the tsserver client and the lsp server are destroyed properly.

This can also affect non-test use-cases but hopefully not for the worse.

The issue with the original problem was that:
a) the server didn't cleanly shut itself down
b) whenever the tsserver was closed (either due to shutdown call or just crashed) the code would also force-exit the LS server process. This was typically OK but it wasn't clean and could be problematic for those who'd want to use the server programmatically and not force-close their process when server closes.

@rchl rchl merged commit 001ad34 into master Jul 25, 2022
@rchl rchl deleted the fix/shutdown branch July 25, 2022 15:29
rchl added a commit that referenced this pull request Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant