connections per host implementation
This commit is contained in:
parent
17afe8a6dd
commit
7764297a42
@ -98,6 +98,11 @@ func validateFrameworkConfiguration() {
|
||||
log.Fatalf("need at least one sender, given %d", config.Senders)
|
||||
}
|
||||
|
||||
// validate connections per host
|
||||
if config.ConnectionsPerHost <= 0 {
|
||||
log.Fatalf("need at least one connection, given %d", config.ConnectionsPerHost)
|
||||
}
|
||||
|
||||
// Stop the lowliest idiot from using this to DoS people
|
||||
if config.ConnectionsPerHost > 50 || config.ConnectionsPerHost < 1 {
|
||||
log.Fatalf("connectionsPerHost must be in the range [0,50]")
|
||||
|
@ -88,9 +88,11 @@ func Process(mon *Monitor) {
|
||||
for i := 0; i < workers; i++ {
|
||||
go func() {
|
||||
for obj := range processQueue {
|
||||
for run := uint(0); run < config.ConnectionsPerHost; run++ {
|
||||
result := grabTarget(obj, mon)
|
||||
outputQueue <- result
|
||||
}
|
||||
}
|
||||
workerDone.Done()
|
||||
}()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user