Commit 290921bb authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

net/rpc: fix data race in benchmark

Fixes #2781.

R=golang-dev, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5577053
parent 0a55958b
......@@ -518,7 +518,7 @@ func benchmarkEndToEnd(dial func() (*Client, error), b *testing.B) {
go func() {
reply := new(Reply)
for atomic.AddInt32(&N, -1) >= 0 {
err = client.Call("Arith.Add", args, reply)
err := client.Call("Arith.Add", args, reply)
if err != nil {
b.Fatalf("rpc error: Add: expected no error but got string %q", err.Error())
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment