Browse Source

close client connection when tcp lost connection in socks5

cnlh 5 years ago
parent
commit
26f48aa7f1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/proxy/socks5.go

+ 1 - 0
server/proxy/socks5.go

@@ -270,6 +270,7 @@ func (s *Sock5ModeServer) handleUDP(c net.Conn) {
 
 	b := common.BufPoolUdp.Get().([]byte)
 	defer common.BufPoolUdp.Put(b)
+	defer target.Close()
 	for {
 		_, err := c.Read(b)
 		if err != nil {