1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:34:42 -07:00
go/internal/jsonrpc2
Ian Cottrell 9ea0146da6 internal/jsonrpc2: remove jsonrpc2.ErrDisconnected
It was not very useful, it basically renamed io.EOF under some limited
circumstances, and was only there for the befit of tests.
Instead, the test now checks io.EOF directly, but also checks for
io.ErrClosedPipe which was also happening.
We also make sure we wrap errors rather than replacing them.
This prevents some weird random test failures due to races in the way they were
closed.

Change-Id: I236b03ac5ba16bf763299b95d882cf58b1f74776
Reviewed-on: https://go-review.googlesource.com/c/tools/+/230303
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-04-27 16:39:59 +00:00
..
servertest internal/jsonrpc2: add concrete types for Call, Notify and Response 2020-04-20 21:05:32 +00:00
handler.go internal/event: renaming the main event API functions 2020-04-23 17:21:36 +00:00
jsonrpc2_test.go internal/jsonrpc2: remove jsonrpc2.ErrDisconnected 2020-04-27 16:39:59 +00:00
jsonrpc2.go internal/jsonrpc2: remove jsonrpc2.ErrDisconnected 2020-04-27 16:39:59 +00:00
messages.go internal/jsonrpc2: add concrete types for Call, Notify and Response 2020-04-20 21:05:32 +00:00
serve_test.go internal/lsp: improve ID formatting 2020-04-10 13:25:36 +00:00
serve.go internal/jsonrpc2: fix goroutine leak when listener is closed 2020-04-27 12:55:06 +00:00
stream.go internal/jsonrpc2: remove jsonrpc2.ErrDisconnected 2020-04-27 16:39:59 +00:00
wire_test.go internal/lsp: fix broken lsp logs 2020-04-21 17:00:05 +00:00
wire.go internal/lsp: fix broken lsp logs 2020-04-21 17:00:05 +00:00