fix file fd leaks

master
dingjun 8 years ago
parent 8dd1b92326
commit 0d0c4f78ce

@ -200,6 +200,9 @@ func (h *handler) isLocalRequest(r *http.Request) bool {
}
func pipeAndClose(r1, r2 io.ReadWriteCloser) {
defer r1.Close()
defer r2.Close()
ch := make(chan int, 2)
go func() {
io.Copy(r1, r2)

Loading…
Cancel
Save