• 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
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...