]> Cypherpunks repositories - gostls13.git/commit
net/rpc: fix aliasing in TestAcceptExitAfterListenerClose
authorBryan C. Mills <bcmills@google.com>
Thu, 9 Feb 2017 19:34:38 +0000 (14:34 -0500)
committerBryan Mills <bcmills@google.com>
Thu, 9 Feb 2017 20:53:39 +0000 (20:53 +0000)
commit4e9874f86e24381fa4305f939d78ed857fe416ca
tree43fa53899ae7b21e15a21894c750078dea4b3704
parentf791b288d1c65420ae6051cdc180e82716952737
net/rpc: fix aliasing in TestAcceptExitAfterListenerClose

TestRPC writes to newServer and newServerAddr guarded with a
sync.Once.
TestAcceptExitAfterListenerClose was overwriting those variables,
which caused the second invocation of TestRPC within a single process
to fail.

A second invocation can occur as a result of running the test with
multiple values for the -cpu flag.

fixes #19001.

Change-Id: I291bacf44aefb49c2264ca0290a28248c026f80e
Reviewed-on: https://go-review.googlesource.com/36624
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/net/rpc/server_test.go