Try fix StreamDomainNameQuery

This commit is contained in:
世界 2023-07-02 16:38:38 +08:00
parent e482053c8a
commit 5ad0ea2b5a
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -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)