Skip to content

Commit

Permalink
Merge pull request #1345 from LoneBoco/fix-server-exit
Browse files Browse the repository at this point in the history
Solve issue #1113.
  • Loading branch information
bjorkstromm authored Jan 24, 2019
2 parents 24fd79b + d8b714c commit 06e3f45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All changes to the project will be documented in this file.

## [1.32.10] - Not Yet Released
* Updated to Roslyn 3.0 to match [VS 2019](https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview#VS2019_Preview2) (PR: [#1391](https://github.com/OmniSharp/omnisharp-roslyn/pull/1391))
* Fixed shutdown event handling for LSP _(Contributed by [@LoneBoco](https://github.com/LoneBoco))_ ([#1113](https://github.com/OmniSharp/omnisharp-roslyn/issues/1113), PR: [#1345](https://github.com/OmniSharp/omnisharp-roslyn/pull/1345))

## [1.32.9] - 2019-1-22
* Updated to Roslyn `2.11.0-beta1-final` and initial support for C# 8 (PR: [#1365](https://github.com/OmniSharp/omnisharp-roslyn/pull/1365))
Expand Down
5 changes: 5 additions & 0 deletions src/OmniSharp.LanguageServerProtocol/LanguageServerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ private Task Initialize(InitializeParams initializeParams)
_server.AddHandlers(RenameHandler.Enumerate(_handlers));
_server.AddHandlers(DocumentSymbolHandler.Enumerate(_handlers));

_server.Exit += (sender) =>
{
_cancellationTokenSource.Cancel();
};

_server.LogMessage(new LogMessageParams()
{
Message = "Added handlers... waiting for initialize...",
Expand Down

0 comments on commit 06e3f45

Please sign in to comment.