From dbfea7ceaceebcb9dd9f987769ec0cdc01675a51 Mon Sep 17 00:00:00 2001 From: Joseph Lawson Date: Wed, 23 Apr 2014 14:02:33 -0400 Subject: [PATCH] as many workers are their are channel --- output_http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/output_http.go b/output_http.go index e338053..b6eb9b5 100644 --- a/output_http.go +++ b/output_http.go @@ -11,6 +11,7 @@ import ( "strconv" "strings" "time" + "runtime" ) type RedirectNotAllowed struct{} @@ -76,7 +77,7 @@ func NewHTTPOutput(options string, headers HTTPHeaders, methods HTTPMethods, ela o.limit, _ = strconv.Atoi(optionsArr[1]) } - for i := 0; i < 100; i++ { + for i := 0; i < runtime.NumCPU(); i++ { go o.worker(i) }