mirror of
https://github.com/golang/go
synced 2024-11-18 16:54:43 -07:00
internal/lsp: send void client response to client/registerCapapbility
Following CL 179157, client/registerCapapbility and client/unregisterCapapbility are both (void) requests, not notifications. Hence the client must send a response, else the server will wait forever. Fixes golang/go#32322 Change-Id: I77969317465c0c31fb29d27519d655712d8c3c2a Reviewed-on: https://go-review.googlesource.com/c/tools/+/179359 Reviewed-by: Peter Weinberger <pjw@google.com>
This commit is contained in:
parent
2b03ca6e44
commit
ce1a3806b5
@ -94,7 +94,8 @@ func clientHandler(log xlog.Logger, client Client) jsonrpc2.Handler {
|
||||
sendParseError(ctx, log, conn, r, err)
|
||||
return
|
||||
}
|
||||
if err := client.RegisterCapability(ctx, ¶ms); err != nil {
|
||||
err := client.RegisterCapability(ctx, ¶ms)
|
||||
if err := conn.Reply(ctx, r, nil, err); err != nil {
|
||||
log.Errorf(ctx, "%v", err)
|
||||
}
|
||||
case "client/unregisterCapability": // req
|
||||
@ -103,7 +104,8 @@ func clientHandler(log xlog.Logger, client Client) jsonrpc2.Handler {
|
||||
sendParseError(ctx, log, conn, r, err)
|
||||
return
|
||||
}
|
||||
if err := client.UnregisterCapability(ctx, ¶ms); err != nil {
|
||||
err := client.UnregisterCapability(ctx, ¶ms)
|
||||
if err := conn.Reply(ctx, r, nil, err); err != nil {
|
||||
log.Errorf(ctx, "%v", err)
|
||||
}
|
||||
case "window/showMessageRequest": // req
|
||||
|
Loading…
Reference in New Issue
Block a user