• Colby Ranger's avatar
    net/http/httputil: Clean up ReverseProxy maxLatencyWriter goroutines. · 5694ebf0
    Colby Ranger authored
    When FlushInterval is specified on ReverseProxy, the ResponseWriter is
    wrapped with a maxLatencyWriter that periodically flushes in a
    goroutine. That goroutine was not being cleaned up at the end of the
    request. This resulted in a panic when Flush() was being called on a
    ResponseWriter that was closed.
    
    The code was updated to always send the done message to the flushLoop()
    goroutine after copying the body. Futhermore, the code was refactored to
    allow the test to verify the maxLatencyWriter behavior.
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/6033043
    5694ebf0
Name
Last commit
Last update
..
chunked.go Loading commit data...
chunked_test.go Loading commit data...
dump.go Loading commit data...
dump_test.go Loading commit data...
persist.go Loading commit data...
reverseproxy.go Loading commit data...
reverseproxy_test.go Loading commit data...