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 reconnection of native language servers #6205

Merged
merged 2 commits into from
Sep 18, 2019
Merged

fix reconnection of native language servers #6205

merged 2 commits into from
Sep 18, 2019

Conversation

akosyakov
Copy link
Member

What it does

fix #6200:

  • Force restart language client contribution on reconnect: Since restart skips if a server is not running, on reconnection a server has to be restarted forcefully if it was running before.
  • Don't wait when a stopped json language server is ready: Timing of resolving LanguageClient.onReady promise is changed in never version of vscode-languageclient. It could lead to a situation that clients still use onReady of a language client before reconnection.

How to test

  • cause connection issues either with system proxy or by stopping a server
  • make sure that json language server is running after reconnection and proper configuration snippets are available in launch.json
  • make sure that other native language servers are restarted on reconnect as well, for example for typescript

Review checklist

Reminder for reviewers

Since restart skips if a server is not running, on reconnection a server has to be restarted forcefully if it was running before.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov
Copy link
Member Author

@tom-shan Could you try whether it resolves #6200?

@akosyakov akosyakov added the languages issue related to languages label Sep 18, 2019
@tom-shan
Copy link
Contributor

@tom-shan Could you try whether it resolves #6200?

I'm veryfying it

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested reconnection with json and typescript, as well as changing JSON schema through preferences. Everything worked nicely!

@tom-shan
Copy link
Contributor

When follow the reproduction steps in #6200, the suggestions are always right. So I think #6200 is resolved. I will pay attention to this problem in my bad network and check whether the problem is gone.

Timing of resolving `LanguageClient.onReady` promise is changed in never version of `vscode-languageclient`. It could lead to a situation that clients still use `onReady` of a language client before reconnection.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
languages issue related to languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Configuration of debug panel shows wrong suggestions when a new websocket is created
3 participants