1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00

internal/lsp: reply to shutdown request

Fixes golang/go#31333

Change-Id: I5cb40baee49c4b1644df5612c977ab1d71942022
Reviewed-on: https://go-review.googlesource.com/c/tools/+/172639
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
Rebecca Stambler 2019-04-17 16:21:47 -04:00
parent 7e40e1726e
commit 6149f385e4

View File

@ -81,7 +81,9 @@ func serverHandler(log xlog.Logger, server Server) jsonrpc2.Handler {
conn.Reply(ctx, r, nil, jsonrpc2.NewErrorf(jsonrpc2.CodeInvalidParams, "Expected no params"))
return
}
if err := server.Shutdown(ctx); err != nil {
if err := server.Shutdown(ctx); err == nil {
conn.Reply(ctx, r, nil, nil)
} else {
log.Errorf(ctx, "%v", err)
}