Skip to content

Commit ba27e4a

Browse files
committed
Merge pull request #229 from PowerShell/daviwil/fix-221
Fix #221: Occasional init hang in LanguageServer
2 parents f58c82b + c425a3e commit ba27e4a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ public LanguageServer(HostDetails hostDetails, ChannelBase serverChannel)
7474

7575
protected override void Initialize()
7676
{
77-
// Initialize the extension service
78-
// TODO: This should be made awaited once Initialize is async!
79-
this.editorSession.ExtensionService.Initialize(
80-
this.editorOperations).Wait();
81-
8277
// Register all supported message types
8378

8479
this.SetRequestHandler(InitializeRequest.Type, this.HandleInitializeRequest);
@@ -107,6 +102,11 @@ protected override void Initialize()
107102
this.SetRequestHandler(InvokeExtensionCommandRequest.Type, this.HandleInvokeExtensionCommandRequest);
108103

109104
this.SetRequestHandler(DebugAdapterMessages.EvaluateRequest.Type, this.HandleEvaluateRequest);
105+
106+
// Initialize the extension service
107+
// TODO: This should be made awaited once Initialize is async!
108+
this.editorSession.ExtensionService.Initialize(
109+
this.editorOperations).Wait();
110110
}
111111

112112
protected override async Task Shutdown()

0 commit comments

Comments
 (0)