chore: adjust code
This commit is contained in:
parent
bc33cd5630
commit
7b22a3bd62
1 changed files with 2 additions and 2 deletions
|
@ -53,13 +53,13 @@ func (sd *SnifferDispatcher) cover(conn *CN.BufferedConn, metadata *C.Metadata)
|
||||||
bufferedLen := conn.Buffered()
|
bufferedLen := conn.Buffered()
|
||||||
bytes, err := conn.Peek(bufferedLen)
|
bytes, err := conn.Peek(bufferedLen)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnln("[Sniffer] the data lenght not enough")
|
log.Debugln("[Sniffer] the data lenght not enough")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
host, err := sniffer.SniffTCP(bytes)
|
host, err := sniffer.SniffTCP(bytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnln("[Sniffer][%s] Sniff data failed", sniffer.Protocol())
|
log.Debugln("[Sniffer][%s] Sniff data failed", sniffer.Protocol())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
metadata.Host = host
|
metadata.Host = host
|
||||||
|
|
Loading…
Reference in a new issue