1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:38:33 -06:00
go/internal/jsonrpc2
Ian Cottrell a8f40b3f4d internal/jsonrpc2: split main loop from construction to fix race
This changes the basic API of a jsonrpc2 connection to run the
read loop as a method rather than in a go routine launched in
the NewConn. This allows the handler to be created and bound
between construction and the read loop starting, which fixes
the race.

Fixes golang/go#30091

Change-Id: I8201175affe431819cf473e5194d70c019f58425
Reviewed-on: https://go-review.googlesource.com/c/tools/+/170003
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-03-29 19:31:51 +00:00
..
jsonrpc2_test.go internal/jsonrpc2: split main loop from construction to fix race 2019-03-29 19:31:51 +00:00
jsonrpc2.go internal/jsonrpc2: split main loop from construction to fix race 2019-03-29 19:31:51 +00:00
log.go cmd/golsp: format logging for the lsp inspector 2018-11-02 22:32:51 +00:00
stream.go internal/jsonrpc2: a basic json rpc library to build an lsp on top of 2018-09-24 17:56:01 +00:00
wire.go cmd/golsp: format logging for the lsp inspector 2018-11-02 22:32:51 +00:00