mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-01 02:46:52 +00:00
close client connection when tcp lost connection in socks5
This commit is contained in:
@@ -270,6 +270,7 @@ func (s *Sock5ModeServer) handleUDP(c net.Conn) {
|
|||||||
|
|
||||||
b := common.BufPoolUdp.Get().([]byte)
|
b := common.BufPoolUdp.Get().([]byte)
|
||||||
defer common.BufPoolUdp.Put(b)
|
defer common.BufPoolUdp.Put(b)
|
||||||
|
defer target.Close()
|
||||||
for {
|
for {
|
||||||
_, err := c.Read(b)
|
_, err := c.Read(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user