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) }()