-
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