Skip to content

Fix #221: Occasional init hang in LanguageServer #229

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

Merged
merged 1 commit into from
May 16, 2016
Merged

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented May 16, 2016

This change fixes an issue in the LanguageServer where the length of time
that it takes to evaluate the extension API script can cause the
"initialize" request to not complete. This leaves the VS Code language
server client in an initializing state where no language features will
work for the rest of the session. The fix is to execute the extension API
script after the "initialize" handler has been registered.


This change is Reviewable

This change fixes an issue in the LanguageServer where the length of time
that it takes to evaluate the extension API script can cause the
"initialize" request to not complete.  This leaves the VS Code language
server client in an initializing state where no language features will
work for the rest of the session.  The fix is to execute the extension API
script after the "initialize" handler has been registered.
@daviwil
Copy link
Contributor Author

daviwil commented May 16, 2016

This one was pretty dumb, I was executing the extension API script before registering message handlers. This caused the handler to be registered after that script finishes. On some machines the "initialize" event would come before the script finished execution which meant that there would never be a handler available to respond to that request.

@daviwil daviwil merged commit ba27e4a into master May 16, 2016
@daviwil daviwil deleted the daviwil/fix-221 branch April 26, 2017 20:02
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
Move away from deprecated language configuration settings
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