Skip to content

Commit

Permalink
fixed udp memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Aug 31, 2020
1 parent 884ad52 commit d947c5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packetserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ func (s *PacketServer) RemoteToClient(remote net.Conn, timeout int, dst []byte,
}
}
l, err := remote.Read(s.wb[12+len(dst) : 65507-16])
if err != nil {
return nil
}
if _, err := io.ReadFull(rand.Reader, s.wb[:12]); err != nil {
return err
}
Expand Down

0 comments on commit d947c5b

Please sign in to comment.