From da8890c38abade93560525aa9a267b24a06cfb91 Mon Sep 17 00:00:00 2001 From: douglarek Date: Wed, 25 Sep 2024 15:16:46 +0800 Subject: [PATCH] fix(sniffer): remove useless EOF warning logs printing (#650) --- component/sniffing/sniffer.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/component/sniffing/sniffer.go b/component/sniffing/sniffer.go index 920ef28..3bc94af 100644 --- a/component/sniffing/sniffer.go +++ b/component/sniffing/sniffer.go @@ -107,13 +107,10 @@ func (s *Sniffer) SniffTcp() (d string, err error) { if s.stream { go func() { // Read once. - n, err := s.buf.ReadFromOnce(s.r) + _, err = s.buf.ReadFromOnce(s.r) if err != nil { s.dataError = err } - if n == 0 { - s.dataError = io.EOF - } close(s.dataReady) }()