From ce9694102923334433a95df87d68a4a97bb7bbfe Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 28 Aug 2018 19:52:31 +0200 Subject: [PATCH] reduce waiting time on sniffing --- app/dispatcher/default.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/dispatcher/default.go b/app/dispatcher/default.go index 6f8adc6c2..41bd983ca 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -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) } } }