mirror of
https://github.com/ehang-io/nps.git
synced 2026-10-31 16:52:12 +08:00
close client connection when tcp lost connection in socks5
This commit is contained in:
1 parent
3dc16414c5
commit
26f48aa7f1
1 file changed
+1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user