8000 Fix hang when server crashes during shutdown by strager · Pull Request #715 · microsoft/vscode-languageserver-node · GitHub
[go: up one dir, main page]

Skip to content

Fix hang when server crashes during shutdown#715

Merged
dbaeumer merged 1 commit intomicrosoft:masterfrom
strager:stop-hang
Jan 4, 2021
Merged

Fix hang when server crashes during shutdown#715
dbaeumer merged 1 commit intomicrosoft:masterfrom
strager:stop-hang

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.

@ghost
Copy link
ghost 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.

2 participants

0