mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
chore: adjust sniffer log
This commit is contained in:
parent
73aa8c7be7
commit
5a1e1050b7
|
@ -100,17 +100,17 @@ func (sd *SnifferDispatcher) sniffDomain(conn *CN.BufferedConn, metadata *C.Meta
|
|||
if err != nil {
|
||||
_, ok := err.(*net.OpError)
|
||||
if ok {
|
||||
//log.Errorln("[Sniffer] [%s] Maybe read timeout, Consider adding skip", metadata.DstIP.String())
|
||||
log.Errorln("[Sniffer] [%s] Maybe read timeout, Consider adding skip", metadata.DstIP.String())
|
||||
conn.Close()
|
||||
}
|
||||
//log.Errorln("[Sniffer] %v", err)
|
||||
log.Errorln("[Sniffer] %v", err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
bufferedLen := conn.Buffered()
|
||||
bytes, err := conn.Peek(bufferedLen)
|
||||
if err != nil {
|
||||
//log.Debugln("[Sniffer] the data length not enough")
|
||||
log.Debugln("[Sniffer] the data length not enough")
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ func NewSnifferDispatcher(needSniffer []C.SnifferType, forceDomain *trie.DomainT
|
|||
for _, snifferName := range needSniffer {
|
||||
sniffer, err := NewSniffer(snifferName)
|
||||
if err != nil {
|
||||
//log.Errorln("Sniffer name[%s] is error", snifferName)
|
||||
log.Errorln("Sniffer name[%s] is error", snifferName)
|
||||
return &SnifferDispatcher{enable: false}, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user