mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-29 23:36:25 -04:00
reduce waiting time on sniffing
This commit is contained in:
parent
02ae48095b
commit
ce96941029
@ -205,7 +205,7 @@ func sniffer(ctx context.Context, cReader *cachedReader) (SniffResult, error) {
|
|||||||
return nil, ctx.Err()
|
return nil, ctx.Err()
|
||||||
default:
|
default:
|
||||||
totalAttempt++
|
totalAttempt++
|
||||||
if totalAttempt > 5 {
|
if totalAttempt > 2 {
|
||||||
return nil, errSniffingTimeout
|
return nil, errSniffingTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,6 @@ func sniffer(ctx context.Context, cReader *cachedReader) (SniffResult, error) {
|
|||||||
if payload.IsFull() {
|
if payload.IsFull() {
|
||||||
return nil, errUnknownContent
|
return nil, errUnknownContent
|
||||||
}
|
}
|
||||||
time.Sleep(time.Millisecond * 100)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user