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 hang when server crashes during shutdown #715

Merged
merged 1 commit into from Jan 4, 2021

Conversation

strager
Copy link
Contributor

@strager strager commented Dec 25, 2020

LanguageClient#stop sends a shutdown request to the language server. If
the server crashes/exits before sending a response, the promise returned
by LanguageClient#stop never settles. This happens because the
disconnect event is ignored during shutdown.

Fix the hang by not ignoring disconnects during shutdown. This will
cause LanguageClient#stop to throw an exception ("Connection got
disposed") if the server crashes or exits unexpectedly during shutdown.

@microsoft-cla-retired
Copy link

microsoft-cla-retired bot commented Dec 25, 2020

CLA assistant check
All CLA requirements met.

@strager strager marked this pull request as draft December 25, 2020 06:56
LanguageClient#stop sends a shutdown request to the language server. If
the server crashes/exits before sending a response, the promise returned
by LanguageClient#stop never settles. This happens because the
disconnect event is ignored during shutdown.

Fix the hang by not ignoring disconnects during shutdown. This will
cause LanguageClient#stop to throw an exception ("Connection got
disposed") if the server crashes or exits unexpectedly during shutdown.
@dbaeumer
Copy link
Member

dbaeumer commented Jan 4, 2021

Thanks a lot!.

@dbaeumer dbaeumer merged commit 960c801 into microsoft:master Jan 4, 2021
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

2 participants