Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Server/LanguageServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,15 @@ await LanguageProtocolEventingHelper.Run(
).ConfigureAwait(false);


// Allow the server receiver to start processing incoming notifications and requests. It
// is necessary to do this now, and not in the Initialized handler, because otherwise
// clients can enter a race with the receiver and have their notifications and requests
// erroneously dropped.
_serverReceiver.Initialized();

// TODO:
if (_clientVersion == ClientVersion.Lsp2)
{
_serverReceiver.Initialized();
_initializeComplete.OnNext(result);
_initializeComplete.OnCompleted();
}
Expand All @@ -328,7 +333,6 @@ public Task<Unit> Handle(InitializedParams @params, CancellationToken token)
{
if (_clientVersion == ClientVersion.Lsp3)
{
_serverReceiver.Initialized();
_initializeComplete.OnNext(ServerSettings);
_initializeComplete.OnCompleted();
}
Expand Down