Skip to content

Commit

Permalink
fixes #370 #368
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlh committed Jan 15, 2020
1 parent 7260565 commit f72e356
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/proxy/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ func (s *UdpModeServer) process(addr *net.UDPAddr, data []byte) {
}
defer s.task.Client.AddConn()
link := conn.NewLink(common.CONN_UDP, s.task.Target.TargetStr, s.task.Client.Cnf.Crypt, s.task.Client.Cnf.Compress, addr.String(), s.task.Target.LocalProxy)
if target, err := s.bridge.SendLinkInfo(s.task.Client.Id, link, s.task); err != nil {
if clientConn, err := s.bridge.SendLinkInfo(s.task.Client.Id, link, s.task); err != nil {
return
} else {
target := conn.GetConn(clientConn, s.task.Client.Cnf.Crypt, s.task.Client.Cnf.Compress, nil, true)
s.task.Flow.Add(int64(len(data)), 0)
buf := common.BufPoolUdp.Get().([]byte)
defer common.BufPoolUdp.Put(buf)
Expand Down

0 comments on commit f72e356

Please sign in to comment.