fix(sniffer): remove useless EOF warning logs printing (#650)

This commit is contained in:
douglarek 2024-09-25 15:16:46 +08:00 committed by GitHub
parent a7675988d8
commit da8890c38a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,13 +107,10 @@ func (s *Sniffer) SniffTcp() (d string, err error) {
if s.stream { if s.stream {
go func() { go func() {
// Read once. // Read once.
n, err := s.buf.ReadFromOnce(s.r) _, err = s.buf.ReadFromOnce(s.r)
if err != nil { if err != nil {
s.dataError = err s.dataError = err
} }
if n == 0 {
s.dataError = io.EOF
}
close(s.dataReady) close(s.dataReady)
}() }()