Skip to content

Commit

Permalink
close tunnel when finish udp data
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlh committed Jan 15, 2020
1 parent 13d90df commit b5a0daa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/proxy/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (s *UdpModeServer) process(addr *net.UDPAddr, data []byte) {
return
} else {
target := conn.GetConn(clientConn, s.task.Client.Cnf.Crypt, s.task.Client.Cnf.Compress, nil, true)
defer target.Close()
s.task.Flow.Add(int64(len(data)), 0)
buf := common.BufPoolUdp.Get().([]byte)
defer common.BufPoolUdp.Put(buf)
Expand Down

0 comments on commit b5a0daa

Please sign in to comment.