From 5ad0ea2b5a2205d7ceb4171bdabda71c170d7c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 2 Jul 2023 16:38:38 +0800 Subject: [PATCH] Try fix StreamDomainNameQuery --- common/sniff/dns.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/sniff/dns.go b/common/sniff/dns.go index d374e607..d69f3b15 100644 --- a/common/sniff/dns.go +++ b/common/sniff/dns.go @@ -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)