mirror of
https://github.com/golang/go
synced 2024-11-18 16:44:43 -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:
parent
7e40e1726e
commit
6149f385e4
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user