• Russ Cox's avatar
    net/http/httptest: fix deadlock in TestIssue7264 · 902f8d9c
    Russ Cox authored
    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
    902f8d9c
server_test.go 1.23 KB