1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-09 09:20:45 +00:00

reduce waiting time on sniffing

This commit is contained in:
Darien Raymond 2018-08-28 19:52:31 +02:00
parent 02ae48095b
commit ce96941029
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -205,7 +205,7 @@ func sniffer(ctx context.Context, cReader *cachedReader) (SniffResult, error) {
return nil, ctx.Err()
default:
totalAttempt++
if totalAttempt > 5 {
if totalAttempt > 2 {
return nil, errSniffingTimeout
}
@ -219,7 +219,6 @@ func sniffer(ctx context.Context, cReader *cachedReader) (SniffResult, error) {
if payload.IsFull() {
return nil, errUnknownContent
}
time.Sleep(time.Millisecond * 100)
}
}
}