]> Cypherpunks repositories - gostls13.git/commit
net/http/httptest: fix deadlock in TestIssue7264
authorRuss Cox <rsc@golang.org>
Mon, 8 Sep 2014 00:13:35 +0000 (20:13 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 8 Sep 2014 00:13:35 +0000 (20:13 -0400)
commit902f8d9ca036974a853ade8efdd609434a19bbbe
treeb80db69dd6eb6aeb2e9067ca111d479232b8f47e
parentb4bfa6c96415f4a578c1e100a515c2c62981b546
net/http/httptest: fix deadlock in TestIssue7264

I am seeing deadlocks waiting on <-inHandler.
It seems to me that there is no guarantee that the
handler actually runs, if the client does

        write header
        close connection

fast enough. The server might see the EOF on the
connection before it manages to invoke the handler.

This change fixes the deadlock, but it may make
the test not actually test anything. Not sure.

LGTM=bradfitz
R=bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/140970043
src/pkg/net/http/httptest/server_test.go