Commit 1fa02060 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: fix data race in benchmark

Fixes #7006

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/44940044
parent 92b5e161
...@@ -2436,7 +2436,7 @@ Host: golang.org ...@@ -2436,7 +2436,7 @@ Host: golang.org
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
conn.Reader = bytes.NewReader(req) conn.Reader = bytes.NewReader(req)
ln.conn = conn ln.conn = conn
go Serve(ln, h) Serve(ln, h)
<-conn.closec <-conn.closec
} }
} }
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