commit | 55b2284a36381359f06b305e246c7bad1b3b929c | [log] [tgz] |
---|---|---|
author | Hana <hyangah@gmail.com> | Sun Jan 31 10:36:25 2021 -0500 |
committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | Mon Feb 01 21:50:25 2021 +0000 |
tree | 48e9596705b407b5e055d16d4d3f883731042b89 | |
parent | 3c08fecea4c3949205dbcd8a4fa105cb7506e677 [diff] |
src/goLanguageServer: block until the language client is ready According to https://github.com/microsoft/vscode-languageserver-node#breaking-changes, we need to wait until the client is actually ready before attempting to make any request including shutdown. Change-Id: Icfa4c9069ad448156794a7d14ba9036a14bdfd55 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288372 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 77e2195..89a3ebd 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts
@@ -253,6 +253,7 @@ languageServerDisposable = languageClient.start(); totalStartCount++; ctx.subscriptions.push(languageServerDisposable); + await languageClient.onReady(); return true; }