diff --git a/router/router.go b/router/router.go index 7a61cdf..3421186 100644 --- a/router/router.go +++ b/router/router.go @@ -405,6 +405,7 @@ func (r *proxyRouter) handleConnection(c net.Conn) { log.Printf("Error dialing backend %s: %v\n", dstHost.String(), err) return } + defer d.Close() err = req.Write(d) if err != nil { log.Printf("Error requesting backend %s: %v\n", dstHost.String(), err)