-
Notifications
You must be signed in to change notification settings - Fork 417
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
Solve issue #1113. #1345
Solve issue #1113. #1345
Conversation
@david-driscoll Does this look right to you? |
I’d say we should look at updating LSP libs to latest instead. @david-driscoll, this is fixed there, right? |
That said, I might have some time updating that in the end of this week. |
I took a look at OmniSharp.Extensions.LanguageServer version 0.10.0. I couldn't get it to work correctly because there has been a ton of changes since the 0.8.0 version I use in my local repository, but this would still be a problem with the latest version. The issue is here: omnisharp-roslyn/src/OmniSharp.Stdio.Driver/Program.cs Lines 35 to 43 in 0496b7e
OmniSharp.exe waits on the cancellation token. The only things that trigger this cancellation token is closing the console or waiting for the host process to terminate. If the host process sends an Exit request, the server will shut down, but the cancellation token for OmniSharp.exe will never get triggered, so the .exe keeps running. If you want to use version 0.10.0, you have to do something like: _server.Exit.Subscribe(_cancellationTokenSource.Token); I think that would work. I never tested it though as I couldn't get 0.10.0 to work. |
@mholo65 @david-driscoll I haven't been following along with LSP very much so I'm going to leave it to you to handle this PR. |
Send cancellation token when the server shuts down so we terminate the process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 |
Send cancellation token when the server shuts down so we terminate the process.