]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: deflake BenchmarkServerFakeConnNoKeepAlive.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Mon, 25 Mar 2013 07:17:10 +0000 (08:17 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Mon, 25 Mar 2013 07:17:10 +0000 (08:17 +0100)
Fixes #5121.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7814046

src/pkg/net/http/serve_test.go

index 5adde545f82c69e3e5ffdcbb4474086995b65a0f..645845555977b5b0a54eec74bf5d5c24475458c5 100644 (file)
@@ -1635,7 +1635,9 @@ Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
        res := []byte("Hello world!\n")
 
        conn := &testConn{
-               closec: make(chan bool),
+               // testConn.Close will not push into the channel
+               // if it's full.
+               closec: make(chan bool, 1),
        }
        handler := HandlerFunc(func(rw ResponseWriter, r *Request) {
                rw.Header().Set("Content-Type", "text/html; charset=utf-8")