Skip to content

Commit

Permalink
Try fix StreamDomainNameQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Jul 2, 2023
1 parent e482053 commit 5ad0ea2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions common/sniff/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ func StreamDomainNameQuery(readCtx context.Context, reader io.Reader) (*adapter.
if length == 0 {
return nil, os.ErrInvalid
}
_buffer := buf.StackNewSize(int(length))
defer common.KeepAlive(_buffer)
buffer := common.Dup(_buffer)
buffer := buf.NewSize(int(length))
defer buffer.Release()

readCtx, cancel := context.WithTimeout(readCtx, time.Millisecond*100)
Expand Down

0 comments on commit 5ad0ea2

Please sign in to comment.