• John Newlin's avatar
    net/http: Release reference to chunkWriter's bufio.Writer on hijack · 92b5e161
    John Newlin authored
    When a connection is hijacked, release the reference to the bufio.Writer
    that is used with the chunkWriter.  The chunkWriter is not used after
    the connection is hijacked.
    
    Also add a test to check that double Hijack calls do something sensible.
    
    benchmark                old ns/op    new ns/op    delta
    BenchmarkServerHijack        24137        20629  -14.53%
    
    benchmark               old allocs   new allocs    delta
    BenchmarkServerHijack           21           19   -9.52%
    
    benchmark                old bytes    new bytes    delta
    BenchmarkServerHijack        11774         9667  -17.90%
    
    R=bradfitz, dave, chris.cahoon
    CC=golang-codereviews
    https://golang.org/cl/39440044
    92b5e161
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...