Skip to content

Fix hang when server crashes during shutdown - #715

Merged
Dirk Bäumer (dbaeumer) merged 1 commit into
microsoft:masterfrom
strager:stop-hang
Jan 4, 2021
Merged

Dirk Bäumer (dbaeumer) merged 1 commit into
microsoft:masterfrom
strager:stop-hang

Conversation

@strager

Copy link
Copy Markdown
Contributor

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

Deleted user (ghost) commented Dec 25, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@strager
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
Copy Markdown
Member

Thanks a lot!.

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