1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:14:46 -07:00
go/internal/jsonrpc2
Rob Findley 63caf62cea internal/lsp/lsprpc: clean up client session on disconnection
Gopls behavior on disconnection is currently somewhat undefined, because
it hasn't mattered when there was a single gopls session per binary
invocation. With golang/go#34111, this changes.

Checks are added to ensure clients and sessions are cleaned up when an LSP
connection closes. Also, normal client disconnection is differentiated
with the jsonrpc2.ErrDisconnected value.

Updates golang/go#34111

Change-Id: I74d48ad6dcfc30d11f7f751dcffb20c18a4cbaa3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220519
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-02-24 23:23:05 +00:00
..
servertest internal/jsonrpc2: add an idle timeout for stream serving 2020-02-24 23:06:35 +00:00
handler.go internal/lsp: cancel early 2019-10-22 07:49:31 +00:00
jsonrpc2_test.go internal/jsonrpc2: fix invalid invocations of Fatalf in goroutines 2020-02-05 19:51:38 +00:00
jsonrpc2.go internal/lsp/lsprpc: clean up client session on disconnection 2020-02-24 23:23:05 +00:00
serve_test.go internal/jsonrpc2: add an idle timeout for stream serving 2020-02-24 23:06:35 +00:00
serve.go internal/jsonrpc2: add an idle timeout for stream serving 2020-02-24 23:06:35 +00:00
stream.go internal/lsp/lsprpc: clean up client session on disconnection 2020-02-24 23:23:05 +00:00
wire.go all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00