fix: udp sniffer reading

This commit is contained in:
mzz2017 2023-04-12 21:47:56 +08:00
parent 4efed17ff9
commit 08f75bef44

View File

@ -98,6 +98,9 @@ func (s *Sniffer) SniffUdp() (d string, err error) {
s.readMu.Lock()
defer s.readMu.Unlock()
// Always ready.
close(s.dataReady)
if len(s.buf) == 0 {
return "", NotApplicableError
}