go/internal
Bryan C. Mills bd04e329ae internal/jsonrpc2_v2: eliminate a potential Accept/Dial race in TestIdleTimeout
The only explanation I can think of for the failure in
https://go.dev/issue/49387#issuecomment-1303979877 is that maybe the
idle timeout started as soon as conn1 was closed, without waiting for
conn2 to be closed. That might be possible if the connection returned
by Dial was still in the server's accept queue, but never actually
accepted.

To eliminate that possibility, we can send an RPC on that connection
and wait for a response, as we already do with conn1. Since the conn1
RPC succeeded, we know that the connection is non-idle, conn2 should
be accepted, and the request on conn2 should succeed unconditionally.

Fixes golang/go#49387 (hopefully for real this time).

Change-Id: Ie3e74f91d322223d82c000fdf1f3a0ed08afd20d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/448096
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2022-11-09 14:00:02 +00:00
..
analysisinternal go/analysis/passes/loopclosure: enable analysis of parallel subtests 2022-11-03 17:48:16 +00:00
apidiff all: gofmt 2022-04-12 17:53:17 +00:00
bug gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
diff gopls/internal/lsp/source: sort protocol edits 2022-10-11 18:07:12 +00:00
event gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
facts internal/facts: share go/analysis/internal/facts with gopls 2022-10-25 15:31:58 +00:00
fakenet
fastwalk internal/fastwalk: improve Darwin performance by ~3x 2022-10-13 16:31:57 +00:00
fuzzy gopls/.../fillstruct: support generic types 2022-09-30 19:58:05 +00:00
gcimporter internal/gcimporter: use nondeprecated go/packages mode bits 2022-11-07 21:25:05 +00:00
gocommand go/packages: issue error if 'go list' on PATH is too new 2022-09-28 14:34:08 +00:00
gopathwalk internal/gopathwalk: remove unnecessary call to os.Lstat 2022-03-31 05:33:07 +00:00
goroot go/internal/gcimporter: update to anticipate missing targets and .as 2022-10-26 20:17:01 +00:00
imports internal/imports: repair warnings from default analyzers 2022-10-19 15:24:07 +00:00
jsonrpc2 all: use constant to avoid repeated definitions 2022-09-19 15:32:23 +00:00
jsonrpc2_v2 internal/jsonrpc2_v2: eliminate a potential Accept/Dial race in TestIdleTimeout 2022-11-09 14:00:02 +00:00
memoize internal/memoize: fix race in Store.Promise 2022-07-28 15:35:11 +00:00
packagesinternal x/tools/go/packages: on Go 1.19+, explicitly ask for -json fields needed 2022-04-19 17:08:06 +00:00
persistent internal/persistent: avoid incorrect map validation due to multiple keys 2022-11-08 21:01:57 +00:00
pkgbits internal/gcimporter: moved from go/internal/gcimporter 2022-11-04 15:23:56 +00:00
proxydir
stack all: gofmt 2022-04-12 17:53:17 +00:00
testenv go/internal/gcimporter: update to anticipate missing targets and .as 2022-10-26 20:17:01 +00:00
tool internal/tool: implement structured help command 2022-05-04 22:58:41 +00:00
typeparams x/tools/internal/typeparams: use regexp to match wanted result 2022-09-02 19:06:05 +00:00
typesinternal internal/typesinternal: update typesinternal for 1.18 2022-02-22 16:42:18 +00:00
xcontext