fix: sniffer

This commit is contained in:
gVisor bot 2022-04-22 17:00:39 +08:00
parent 7b9a24ee08
commit de105c08f6

View file

@ -88,6 +88,7 @@ func (sd *SnifferDispatcher) sniffDomain(conn *CN.BufferedConn, metadata *C.Meta
if sniffer.SupportNetwork() == C.TCP { if sniffer.SupportNetwork() == C.TCP {
conn.SetReadDeadline(time.Now().Add(3 * time.Second)) conn.SetReadDeadline(time.Now().Add(3 * time.Second))
_, err := conn.Peek(1) _, err := conn.Peek(1)
conn.SetReadDeadline(time.Time{})
if err != nil { if err != nil {
_, ok := err.(*net.OpError) _, ok := err.(*net.OpError)
if ok { if ok {